Different libraries to link for Debug and Relase on Visual Studio


#1

Hello folks. I have external libraries to be used in my project. This libraries has different static libraries (.lib)s for Debug and Release.

I need to point those files one by one in visual studio in Project Properties > C++ > Linker > Input > Additional Libraries.

I can give different external static libraries for both Debug and Release in Visual Studio, but I cannot do that in Projucer. I have only one “External Libraries to link” section and it affects both Debug and Release. But I have different libraries for Debug and Release. How can I specify that in Projucer?

I should have seperate sections for both Debug and Release.

If that is not possible, you can help me by another way.

When I configure my project in Visual Studio, I lost that configuration when I add some source files in Projucer and save. Is there any way that I don’t lose that configuration?

Thanks in advance…


#2

There are two sub nodes below “Visual Studio 2015” called Debug and Release. If you select them, you can add different libraries…


#3

I have already digged into those, but they don’t contain such fields.


#4

Yes, just realised that they are not present. For other options it works like that, but not here.


#5

You can use a #pragma in your project’s main header file:

#if JUCE_WINDOWS
    #ifdef JUCE_DEBUG
        #pragma comment (lib, "sicuucd.lib")     // ICU Core Lib debug
        #pragma comment (lib, "sicudtd.lib")     // ICU Data Stub debug
    #else
        #pragma comment (lib, "sicuuc.lib")      // ICU Core Lib release
        #pragma comment (lib, "sicudt.lib")      // ICU Data Stub release
    #endif
#endif

Rail


#6

Previous thread BTW

Cheers,

Rail