PDA

View Full Version : different library names for 'official' and hand-built Qt?



akos.maroy
20th July 2009, 09:45
I'm having a strange issue here. I'm trying to compile & link my Qt-based application using MS Visual Studio. What I did is that I downloaded Qt Creator to have qmake & related tools, and I downloaded & compiled the Qt libraries using the qt-all-opensource-src.4.5.2.zip file, using MS Visual Studio 2008.

To my surprise, the qmake that comes with Qt Creator and the qmake that is the result of compiling qt-all-opensource-src.4.5.2.zip are different. For example, they generated different Qt library dependencies. The one that comes with Qt Creator generates dependencies on libraries that end if the character '4', for example QtSvg4.lib, while the qmake that comes from manual compiling the source code generated libraries & dependencies without the character postfix '4' (e.g. QtSvg.lib). (these are dependencies generated from the very same qmake project files)

what is the source of this difference?

can one compile qt-all-opensource-src.4.5.2 the very same way as Qt Creator is compiled, to generate the very same MS Visual Studio project files form the very same qmake project files?

nish
20th July 2009, 09:49
check if you have compiled the source in static mode... becoz the static ones dont have 4

akos.maroy
20th July 2009, 10:27
check if you have compiled the source in static mode... becoz the static ones dont have 4

indeed I have.

the question then is: how do I force qmake generate dependencies on static vs. dynamic Qt libraries?

nish
20th July 2009, 10:29
the question then is: how do I force qmake generate dependencies on static vs. dynamic Qt libraries?

can you rephrase your question.. i did not understood it:(

Lykurg
20th July 2009, 10:42
the question then is: how do I force qmake generate dependencies on static vs. dynamic Qt libraries?

Use CONFIG += static in your pro file. (or CONFIG += staticlib)
... and of course rebuild you project.

akos.maroy
20th July 2009, 13:00
Use CONFIG += static in your pro file. (or CONFIG += staticlib)
... and of course rebuild you project.

yes, but the interesting thing is, that I'm running the two qmakes on the very same project files... IMHO they should produce the same result, especially as both qmake's are of the same version.

it seems that qmake defaults are different, based on how qmake was compiled?

nish
21st July 2009, 02:13
it seems that qmake defaults are different, based on how qmake was compiled?
yes you are rite