I noticed I am getting Class X.Y is implemented in both A and B when loading dylib importing module X while main module (the one that loads dylib) is importing same module X.
I created PluginInterface module that is supposed dynamically linked to PluginImplementation package which will create dylib. Then I created PluginConsumer package that loads libPluginImplementation.dylib and imports PluginInterface to be able to comunicate with the plugin. When I run PluginConsumer, I get mentioned error when I load dylib:
objc[66212]: Class _TtC15PluginInterface15PluginInterface is implemented in both /Users/Lope/Dev/swift/SwiftPlugins/PluginConsumer/.build/x86_64-apple-macosx10.10/debug/libPluginInterface.dylib (0x10fc7b668) and /Users/Lope/Dev/swift/SwiftPlugins/PluginImplementation/.build/x86_64-apple-macosx10.10/debug/libPluginInterface.dylib (0x1107dd668). One of the two will be used. Which one is undefined.
You can find all three packages in following repositories:
Environment
macos, swift 4.0
Additional Detail from JIRA
md5: 1039833999745eed5a7ff22b2c7d505f
duplicates:
Issue Description:
I noticed I am getting Class X.Y is implemented in both A and B when loading dylib importing module X while main module (the one that loads dylib) is importing same module X.
I created PluginInterface module that is supposed dynamically linked to PluginImplementation package which will create dylib. Then I created PluginConsumer package that loads libPluginImplementation.dylib and imports PluginInterface to be able to comunicate with the plugin. When I run PluginConsumer, I get mentioned error when I load dylib:
objc[66212]: Class _TtC15PluginInterface15PluginInterface is implemented in both /Users/Lope/Dev/swift/SwiftPlugins/PluginConsumer/.build/x86_64-apple-macosx10.10/debug/libPluginInterface.dylib (0x10fc7b668) and /Users/Lope/Dev/swift/SwiftPlugins/PluginImplementation/.build/x86_64-apple-macosx10.10/debug/libPluginInterface.dylib (0x1107dd668). One of the two will be used. Which one is undefined.
You can find all three packages in following repositories:
https://github.com/Lopdo/SwiftPlugins-PluginInterface
https://github.com/Lopdo/SwiftPlugins-PluginImplementation
https://github.com/Lopdo/SwiftPlugins-PluginConsumer
The text was updated successfully, but these errors were encountered: