[Qt-interest] qmake Windows library location resolve problem

David Forstenlechner dforsten at newtek.com
Sat Sep 19 02:13:19 CEST 2009


Another problematic behavior of qmake in certain situations is the
habit to resolve the path of libraries a project links against,
without putting the resulting path into quotes.

e.g.:
LIBS += -lcommon
expands to
<full_path_to_lib>\common.lib

That breaks as soon as a library include directory contains spaces.


To work around that issue I do the following:

win32 {
	LIBS += common.lib
} else {
	LIBS += -lcommon
}

Which forces qmake not to try to guess the library location.
Not very elegant, but works.

Cheers,
- DavidF



More information about the Qt-interest-old mailing list