Conditionally link library?

I have a requirement to link in a certain library ONLY in Windows one configuration, and not in others. I saw a similar post from a few years back, where the link needed to use a library with a different name when it is a Debug build, but there was not a good answer given.

Is there some way to only link a particular library with, for example, the Release build, but not with the Debug build? The only place to enter the name of the libraries to be linked is at the Exporter level (e.g., “Visual Studio 2017”), not at the Configuration (Debug/Release) level. How do I resolve this in JUCE?

Yes, use a pragma… check out how the AAX Libraries are linked.


1 Like