PDA

View Full Version : getting qmake to make the plugin



illuzioner
4th June 2007, 22:27
hey all,

i'm trying to to build the worldtimeclockplugin for designer that came w/ qt4 on win xp.

the first problem is that the pro file that came w/ it seems to use 2 variables qmake doesn't recognize. in my normal environment, QTDIR is defined, but the variables QT_BUILD_TREE and QT_INSTALL_PLUGINS are not.

however, the .pro file looks like this:


message ( "QTDIR = " $$[QTDIR])
message ( "Build tree = " $$[QT_BUILD_TREE]/plugins/designer)
message ( "target.path = " $$[QT_INSTALL_PLUGINS]/designer)

CONFIG += designer plugin debug_and_release warn_on
TEMPLATE = lib
DESTDIR = $$QT_BUILD_TREE/plugins/designer

CONFIG(debug, debug|release) {
unix: TARGET = $$join(TARGET,,,_debug)
else: TARGET = $$join(TARGET,,d)
}

HEADERS = worldtimeclock.h \
worldtimeclockplugin.h
SOURCES = worldtimeclock.cpp \
worldtimeclockplugin.cpp

# install
target.path = $$[QT_BUILD_TREE]/designer
sources.files = $$SOURCES $$HEADERS *.pro
sources.path = .
INSTALLS += target sources


i added the message lines in the beginning. this is the output:

Project MESSAGE: "QTDIR = "
Project MESSAGE: "Build tree = " /plugins/designer
Project MESSAGE: "target.path = " C:\Qt4\plugins/designer
Project MESSAGE: "QTDIR = "
Project MESSAGE: "Build tree = " /plugins/designer
Project MESSAGE: "target.path = " C:\Qt4\plugins/designer
Project MESSAGE: "QTDIR = "
Project MESSAGE: "Build tree = " /plugins/designer
Project MESSAGE: "target.path = " C:\Qt4\plugins/designer

QTDIR is blank
QT_BUILD_TREE is blank
QT_INSTALL_PLUGINS is properly defined.

qmake doesn't give any warnings or errors, but nmake (i have visual studio 2003) gives
NMAKE : fatal error U1077: 'cl' : return code '0xc0000135'

any ideas where these things are (un)defined and why nmake is choking? i haven't modified the code, just copied the directory and i'm trying to make the plugin.

thanks!
lou

illuzioner
5th June 2007, 02:52
does anybody have any ideas at all??

thanks again,
lou

jacek
5th June 2007, 02:54
qmake doesn't give any warnings or errors, but nmake (i have visual studio 2003) gives
NMAKE : fatal error U1077: 'cl' : return code '0xc0000135'
Is that the first error message? Could you post the command that caused that error?

illuzioner
5th June 2007, 07:49
hi, thanks for looking.

the entire output from the nmake is this:


Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

nmake -f Makefile.Release

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

cl -c -nologo -Zm200 -O2 -MD -O2 -MD -W3 -w34100 -w34189 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQDESIGNER_EXPORT_WIDGETS -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"G:/Qt4/include/QtCore" -I"G:/Qt4/include/QtGui" -I"G:/Qt4/include/QtXml" -I"G:/Qt4/include" -I"G:/Qt4/include/QtDesigner" -I"G:/Qt4/include/ActiveQt" -I"release" -I"." -I"G:/Qt4/mkspecs/win32-msvc.net" -Forelease\ @C:\DOCUME~1\Gene\LOCALS~1\Temp\nm323.tmp
NMAKE : fatal error U1077: 'cl' : return code '0xc0000135'
Stop.
NMAKE : fatal error U1077: '"F:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\nmake.exe"' : return code '0x2'
Stop.

so that's the only error returned. i'm clueless as to what's going on. the qmake variables are confusing me too, as they're used but i can't see where they're ever defined.

illuzioner
5th June 2007, 20:45
woops, thought you wanted the output instead of the command. the commands are:

qmake worldtimeclockplugin.pro

and then simply

nmake

that's it. what should i do?? :confused:

jacek
5th June 2007, 22:41
This might help: http://lists.trolltech.com/qt-interest/2007-01/msg00560.html

Do you use the Qt Command Prompt or regular cmd.exe?

illuzioner
6th June 2007, 16:43
This might help: http://lists.trolltech.com/qt-interest/2007-01/msg00560.html

Do you use the Qt Command Prompt or regular cmd.exe?

i looked at this link, but i don't see how it applies. there was something about vcvarsall.bat, (which i don't know what it is or does), but it doesn't seem to be included in vs 2003. is vsvars.bat the 2003 equivalent ?

originally i didn't even understand your question. i then found in the qt programs folder the Qt command prompt. so, to answer your question, i have been using a straight dos prompt, not the qt version. i opened the qt prompt and did an nmake, and it actually compiled and linked without errors!

it doesn't seem that the qt prompt really does that much other than set up a couple of variables. so, i'm wondering which command made the difference. i think my path and qtdir were fine, so maybe the qmakespec, but i really don't know what the alternative to win32-msvc.net would even be.

anyway, it works now, so just asking the question helped. thanks!

lou

jacek
6th June 2007, 17:49
is vsvars.bat the 2003 equivalent ?
Yes, it sets up some environment variables required by M$ toolchain.


it doesn't seem that the qt prompt really does that much other than set up a couple of variables. so, i'm wondering which command made the difference.
I would double check the PATH variable.