SharedResourcePointer in a static library in release build

Hi,
I’m trying to use a SharedResourcePointer in a static library for use in an iOS project. In debug builds it works fine, but for some reason if I do a release build, the SharedResourcePointer goes out of scope (I assume) and get deleted, causing crashes.
I had to add FORCE_NO_DEBUG=0 to get it to link without errors in the release build…could that have something to do with it?

Thanks,
Rob

Sorry everybody, I fell into the exact trap that the this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode::this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode linker error is meant to protect you from.

A tip for people that are using Juce as a static lib in another project, don’t ignore this weird long error and use JUCE_FORCE_DEBUG=0 to get around it. If you get the error it’s because your parent project probably isn’t defining NDEBUG=1 in the release build, or DEBUG=1 in the debug build.

1 Like