[Qt-interest] qmake, link libraries and visual studio projects. How to link?

Martin Hauner martin.hauner at gmx.net
Mon Jun 1 15:26:05 CEST 2009


Hi,

I wonder how I get visual studio 2008 to properly link qmake libs on Windows it 
depends on. The generated vcproj contains the paths from the pro file but not 
quite right.

In my root pro file I have this:

TEMPLATE = subdirs
SUBDIRS = util main/sub main

i.e. main/sub should be linked into main.

the main.pro contains this:

LIBS += -Lsub -lsub -L../util -lutil


I run qmake like this:

qmake -tp vc -r root.pro


The "additional library directories" in the main.vcproj linker settings includes 
the sub subfolder. To properly link the lib from sub it would need "sub/debug" 
and sub/release" for the debug and release build. So linking fails.

Do I have to handle this myself by using win32:debug and win32:release 
directives or is there a simpler construct to let qmake add the debug & release 
folder to the library paths?

It would be somewhat inconvenient if I had to add special handling for each 
subfolder.


Thanks.


-- 
Martin

Subcommander 2.0.0 Beta 4 - http://subcommander.tigris.org
a Win32/Unix/MacOSX subversion GUI client & diff/merge tool.



More information about the Qt-interest-old mailing list