How to have different project dependencies for each project configuration?

I would like to have different project dependencies depending on which project configuration I am currently creating.

For example, I do not want to create and link SomeTestLib.vcproj in the Release configuration, but I would like to build and link it to Debug.

One solution that sorta works is to use conditional compilation macros:

#ifdef DEBUG  
#pragma comment( lib, "SomeTestLib" )  
#endif

But in this case, the debugger and IntelliSense do not work for SomeTestLib.
Is there a .sln or .vcproj hack that I could use?
Thank you

+5
source share
6 answers

Google , , VS, ( , , ).

-, IDE , , , . , .

, , "" NOTHING !

, ​​ Visual Studio . , IDE, . VS, , , " ", , , . , .

, :

  • "".
  • "/", .
  • " → → ".
  • "Output File" "" ( , , parens).
  • "".

, , . , , .

, !

Daniel

+6

Linker/General/Link .

, .

+2

/ → ..

+1

. lib , . " "

0

. .

→ >

Debug, Release All, "Build".

0

" " → "" → "Enter", " " , , :.lib. , lib/dll.

, , , Solution → Project Dependencies → [ / ] → , /.

, - , , / lib/dll, .

0
source

All Articles