[Interest] Weird "qmake" behaviour

Yves Bailly yves.bailly at sescoi.fr
Thu Nov 24 09:36:08 CET 2011


Greetings all,

Here's a question about a weird behaviour of "qmake".
- Qt release: 4.7.4
- OS: Windows 7 64bits
- Compiler: Visual C++ 2010 Pro

Let's assume I have a "project.pro" file containing something like this:

LIBS += -L$(SOME_LIB_PATH)
LIBS += -lsome_lib_cool

...so I have a bunch of "*.lib" files in a directory SOME_LIB_PATH.

Now assume there are two files in this directory:
SOME_LIB_PATH/some_lib_cool.lib
SOME_LIB_PATH/some_lib_cool2.lib

The weird thing is that when generating the "project.vcxproj" file (for
use within Visual C++), "qmake" includes a link to "some_lib_cool2.lib",
*NOT* to "some_lib_cool.lib" as requested in the "project.pro" file...

As if "qmake" was using the given "-l" filenames as patterns and just
returning the last filename actually found in the directory.

Has anyone else seen this behaviour? Is there a workaround? (no, I don't
want to remove/rename that "some_lib_cool2.lib" file, it's here for
plenty of reasons, good or bad is not the point here).

Thanks for any hint.

-- 
      /- Yves Bailly - Software developper  -\
      \- Sescoi R&D  - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."



More information about the Interest mailing list