I’m building JUCE modules as a static library, by creating a project in the projucer with a CLion exporter and then adding Builds/CLion as a subdirectory in my parent CMakeLists.
I keep getting the linker error from JUCE_CORE:
this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode
However: I only get this linker error sometimes, and only after cleaning the project. I’m defining _DEBUG=1
and DEBUG=1
(as well as _NDEBUG and NDEBUG for release) for all my targets.
The only workaround that I’ve found works is to rewrite/rename my targets in the parent CMake file and build from scratch.
Is there a way to silence the error? I’m confident that my code is being compiled correctly, the linker is just freaking out. I don’t really understand how those checks are supposed to work, any ideas what I should be doing to debug?