PDA

View Full Version : QT3/QT4 Simultaneous



JediSpam
22nd August 2011, 23:17
Hello!

I am currently trying to build QT 3.3 and QT4.7 projects on the same machine and wondering how this can be done. I tried to add the QT4 path at the end of QMAKESPEC in the system environment variables after QT3 (not sure if that is even allowed) but no luck when building QT3 or QT4. When I removed QT4's mkspec path QT3 builds correctly. Any ideas? I'm also getting these errors when removing QT3's paths and just having QT4's:


Error processing project file:
QFile::open: No file name specified
QDir::readDirEntries: Cannot read the directory: /mkspecs (UTF8)
qt_config.prf:10: include(file) requires one argument.
qt_config.prf:11: Unknown test function: debug
qt_functions.prf:1: Unknown test function: defineReplace
qt_functions.prf:18: Unknown test function: defineTest
qt_functions.prf:91: Unknown test function: defineTest


Any help would be great! Thanks!

wysota
22nd August 2011, 23:41
Why do you want to set QMAKESPEC to contain both Qt3 and Qt4 dirs? You only need to call the right version of qmake (either for Qt3 or Qt4) for everything to work.

JediSpam
23rd August 2011, 00:21
Why do you want to set QMAKESPEC to contain both Qt3 and Qt4 dirs? You only need to call the right version of qmake (either for Qt3 or Qt4) for everything to work.

How can I do this? I noticed for VS2003 QT3's is "win32-msvc.net" and QT4's is "win32-msvc2003". Does this basically mean I can't build both without logging off and back on?

wysota
23rd August 2011, 01:00
I have no idea what you mean by logging off and on in this context. You need two versions of qmake -- one for Qt3 and the other for Qt4. Then you can set QMAKESPEC to the directory containing the specs you want (if you want, as you can also set the specs by passing arguments to qmake).

JediSpam
23rd August 2011, 15:07
sorry for the confusion. i meant by logging off/on windows to reset the qmakespec variable under environment paths. let me look into passing the arguments

wysota
23rd August 2011, 16:00
You don't have to log off to change environment variables. You can set them in the command line.

JediSpam
23rd August 2011, 20:44
thanks for the help so far! I managed to build QT4 correctly by specifying what qmake and qmakespec i wanted to run. I successfully can build the examples but now when I try to run one of the .exe I get this error.


animatedtiles.exe - Entry Point Not Found
The procedure entry point "?free@QVectorData@@SAXPAU1@H@Z" could not be located in the dynamic link library QtCored4.dll

I tried to move the QtCored4.dll to the debug folder but still did not work. Any idea?

JediSpam
23rd August 2011, 23:30
fixed issue by moving directories into the front of PATH. Thanks!

wysota
24th August 2011, 08:33
In situations like this it is best to either use a manifest that will tell Windows which libraries to use or to have a script that will set all the paths properly and execute the main application binary.