PDA

View Full Version : Howcome Qmake can work without having QMAKSEPC defined in the enivronement variable.



Guett_31
7th February 2013, 00:08
Hello,

I'm running Qt5.0.0 msvc2010 using Qt creator for developping my projects.

I realized that the QMAKESPEC environement variable in not defined on my system.
When I type "QMAKESPEC" in the console it returns that it is not recognize, or if I look into System Properties/Advanced/Environement Variables... I cannot find it either.

I'm able to generate makefiles and to compile my projets with Qt creator though.

How come qmake is able to find the apropritate qmake.config without QMAKESPEC being defined?...I'm confused.
If someone can help me to understand this that would be great!

Thanks!

wysota
7th February 2013, 00:13
Most probably because your qmake is configured to use a default target in case the variable is not set.

Guett_31
7th February 2013, 01:07
Yes, but how was the default target defined? How did it get the apropriate qmake.conf file. The standard Qt distribution comes with many of these files.
Does Qt creator set it for qmake?

I tried to dertermine what default qmake.conf it uses by doing:
qmake -query QMAKESPEC
in the console, and it returns **unknown**. It probably uses another variable name internally.

Thanks!

wysota
7th February 2013, 01:25
Creator usually calls qmake and passes the spec info directly however for example on Linux there is a symlink in the mkspecs directory called "default" that points to the predetermined target, e.g. on my system:

lrwxrwxrwx 1 root root 12 paź 2 13:06 default -> linux-g++-64