Introjucer: different debug/release "extra linker flags"


#1

Hello all,

Building a project in vs2010 which uses a library (which I created myself)…

In the extra linker flags in the introjucer I can add this lib via “extra linker flags”, but in vs2010 you can’t mix debug libs with release projects and vice versa…
So linking will either fail in release, or in debug.

Is there a way to define DIFFERENT linker flags for release and debug?

  • bram

#2

You can set different preprocessor definitions for release/debug, and then you can use those those macros later on in the compiler target settings, by preceding them with a $. A bit fiddly, but it’s possible.


#3

Hey Jules,

I tried all of these combinations:

   MY_LIB_PATH="../../path/to/debug/lib/"
   /LIBPATH:$MY_LIB_PATH mylib.lib

   MY_LIB_PATH="../../path/to/debug/lib/"
   /LIBPATH:"$MY_LIB_PATH" mylib.lib

   MY_LIB_PATH=/LIBPATH:"../../path/to/debug/lib/"
   $MY_LIB_PATH mylib.lib

   MY_LIB_PATH="/LIBPATH:\"../../path/to/debug/lib/\""
   $MY_LIB_PATH mylib.lib

None of which seem to work…

If I use the path directly, i.e.

   /LIBPATH:"../../path/to/debug/lib/" mylib.lib

that works fine, so it’s not the path that’s wrong…

  • Bram

#4

The format is ${NAME}

It does actually say this in the roll-over help for some of the settings, but I admit it’s hard to spot.


#5

ahhhh, that DOES work…

while on the topic, any chance of including visual studio “post-build-events” in the introjucer? :slight_smile:

  • bram

#6

[quote=“bdejong”]while on the topic, any chance of including visual studio “post-build-events” in the introjucer? :slight_smile:
[/quote]

I think that’s on my list…


#7

awesome! :slight_smile:

thx jules!

  • bram