visual studio 2010 - VS2010 linking of static library behave differently in separate solutions -
lets have solution s1 2 projects pdep , pmaster, respectively creating static , dynamic library. have configurations:
- release win32 : produces
pdep.lib - debug win32 : produces
pdepd.lib - release x64 : produces
pdepx64.lib - debug x64 : produces
pdepx64d.lib
pmaster link configuration done configuration properties -> linker -> input -> additional dependencies
no #pragma comment(lib ) in code. no common properties references.
what observe :
in s1 both pdep , pmaster command line linker fine. ie
/libpath:"c:\pdep\lib\x64\release" "pdepx64.lib"in solution s2 freshly created clicking on project pmaster, i have additional line absolute path specific version of pdep, regardless of configuration. ie
/libpath:"c:\pdep\lib\x64\release" "pdepx64.lib" "c:\pdep\lib\pdepd.lib"
how linker in s2 derives additional option "c:\pdep\lib\pdepd.lib"?
how rid of it?
multiple possibilities:
- common properties -> references
- link library dependencies in linker or librarian section. assumes project dependencies have been setup.
#pragma comment(lib...)playing role
Comments
Post a Comment