[Qt-interest] Qmake and .pro troubles Qt 4.5.0
Kenneth Beck
nekkceb at comcast.net
Wed Mar 11 14:14:14 CET 2009
I just installled Qt 4.5.0 for Visual C++2003 IDE, and also installed
the new Qt Creator, in a separate user environment in Win XP SP3. I then
compiled a program I have been supporting for years (since Qt 4.2..)
using the Qt Creator and Mingw compiler. I now want to go back to Visual
C++. I have added some scoping in the .pro file to be able to switch
between the two, but things are not working right. The entire .pro file
is listed at the end of this.
1. The debug and release sections both get called, either calling qmake
from the command line in a console window, or in the IDE, using Qt/Open
Solution... In fact, it appears that the entire .pro file gets processed
3 times, that seems new behavior, I do not recall seeing that before.
Do I have a subtle syntax error in the .pro file that is causeing this?
2. When I set my QMAKESPEC to win32-msvc.net and call qmake from the
command line, I get this message:
Project MESSAGE: The mkspec/win32-msvc.net is now deprecated, use
win32-msvc2002 or win32-msvc2003
If I change to win32-msvc2003, then in the IDE I get the opposite, that
win32-msvc.net is the preferred setting. When I look in the folder
Qt\4.5.0\mkspecs\win32-msvc2003, I see that the header there just refers
to the win32-msvc.net header!
Why the message about win32-msvc.net being deprecated??
3. I cant seem to consistently get the IDE to recognize the
LIBS += $(QTDIR)/plugins/designer/XYPlot0d.lib
statement. Sometimes I get the XYPlot0d.lib and sometimes not. So I get
linker errors when it is not there.
How do I avoid all this. Are there syntax errors in my .pro (see below)?
Here is my environment (WinXP SP3):
QMAKESPEC=win32-msvc.net
QTDIR=C:\Pgms\Qt\4.5.0
QTJAVA=C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip
QT_INSTALL_EXAMPLES=C:\Pgms\Qt\4.5.0\examples
In the IDE I do have Qt set to 4.5.0
Here is my .pro file:
message(QMAKESPEC = $$QMAKESPEC)
TEMPLATE = app
LANGUAGE = C++
TARGET = BIPSMain
DESTDIR = ../
CONFIG += qt warn_on debug exceptions thread
QTPLUGIN += qjpeg
unix {
UI_DIR = .ui
MOC_DIR = .moc
OBJECTS_DIR = .obj
}
DEFINES += BIPSFORM_LOG=1
DEFINES += BIPSDACQ_LOG=1
DEFINES -= BIPS_DLL
DEFINES += BIPSGRAPH_LOG=1
win32:DEFINES -= UNICODE
win32{
message(win32: setting mcc lib)
LIBS += c:/pgms/mcc/cwin/cbw32.lib
}
win32-msvc.net{
debug {
message(win32-msvc: debug setting XYPlot0d.lib)
LIBS += $(QTDIR)/plugins/designer/XYPlot0d.lib
}
release {
message(win32-msvc: release setting XYPlot0.lib)
LIBS += $(QTDIR)/plugins/designer/XYPlot0.lib
}
}
win32-g++{
message(win32-g++: setting libXYPlot0.a)
LIBS+=$(QTDIR)/plugins/designer/libXYPlot0.a
}
win32:INCLUDEPATH += ../ ../BIPSWidgets ../MainLib ../../GenLib
../../GenWidgets ../../GenNumRec c:/pgms/mcc/cwin
#The following line was inserted by qt3to4
QT += qt3support
RESOURCES = ../BIPS.qrc
#Include file(s)
include(BIPSDacq.pri)
Project MESSAGE: QMAKESPEC =
Project MESSAGE: win32: setting mcc lib
Project MESSAGE: win32-msvc: debug setting XYPlot0d.lib
Project MESSAGE: win32-msvc: release setting XYPlot0.lib
Project MESSAGE: QMAKESPEC =
Project MESSAGE: win32: setting mcc lib
Project MESSAGE: win32-msvc: debug setting XYPlot0d.lib
Project MESSAGE: win32-msvc: release setting XYPlot0.lib
Project MESSAGE: QMAKESPEC =
Project MESSAGE: win32: setting mcc lib
Project MESSAGE: win32-msvc: debug setting XYPlot0d.lib
Project MESSAGE: win32-msvc: release setting XYPlot0.lib
More information about the Qt-interest-old
mailing list