I have been building a static library with Juce which I want to use in another Juce application. Everything has worked out fine so far but now I’m facing the following problem:
When I compile the library in release mode and want to link against it when compiling the Juce apllication in debug mode I get the error:
ld: 2116 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
The duplicate symbols are found in the Juce modules.
When I compile both the library and the application in release or both in debug everything works out fine.
However there are reasons to have the library as a release build and compiling the application in debug:
- The library performs some heavy computations and as a debug build it is incredibly slow.
- Eventually the library and the contained algorithms should be delivered to a client without him being able to see the source code. As a compiled debug library it would still be possible to step through the code with a debugger.
I am working on Mac OS using Xcode.
How can I resolve this duplicate symbol issue?
Looking forward to hearing some hints!