PDA

View Full Version : How to compile the Qt 4.6 release in VS2008?

tszzp
11th December 2009, 04:05
I need integrate the Qt 4.6 release into VS2008. The step as follow:
1. Add the \$QTDir\bin to the PATH variable
2. Run the Vcvarsall.bat
3. Configure -platform win32-msvc2008
4. nmake(or compile the project.sln).

It work correct before the step 4. It work error in the step 4.
The error message as follow(compile the project.sln).
Error 1 fatal error C1083: Cannot open compiler generated file: 'tmp\obj\debug_shared" /link /dll /out:xml.dll': Invalid argument c:\Qt\2009.05\qt\src\xmlpatterns\xml.h 1

Error 2 fatal error LNK1181: cannot open input file 'c:\Qt\2009.05\qt\lib\QtXmlPatternsd4.lib' xmlpatterns

It can compile the Qt 4.5.3 successful when I use the above step.
The qt version I compiled is open source version.
How to solve it? thanks.

aamer4yu
11th December 2009, 05:07
You seem to be using the Qt SDK (http://qt.nokia.com/downloads/sdk-windows-cpp) . This wont work with Visual Studio.
You need to download the Qt source for Windows (http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.0.zip) and compile.

Better still, you have Qt binary for VS 2008. (http://qt.nokia.com/downloads/windows-cpp-vs2008) which you can use easily

tszzp
15th December 2009, 08:30
Thank you for your help. I compile successful the Qt source for Windows(Qt 4.6), but can't compile successful in Qt SDK 4.6. What's the difference in Qt SDK and Qt source for windows? Now I current use the Qt SDK 4.5.3, I can compile it successful, then can develop some program base on Qt SDK 4.5.3, then work correct. thanks.

aamer4yu
15th December 2009, 08:37
Qt SDK contains pre-built libraries , built with Mingw. You cannot use that with Visual Studio. However you can use it with Qt Creator which will use MinGW to compile.

If you want to use Visual Studio,,,you have to compile Qt from source or download binary for VS 2008 as mentioned in last post.

hml
28th December 2009, 01:15
I have mingw latest version with gcc 4.4 (TMC) on win xp sp3 32bit
I don't want QtCreator.
Is there a place to download the libraries (debug and release) and dev header files for gcc4.4/mingw?
Is it one of the files qt-sdk-win-opensource* in ftp://ftp.qt.nokia.com/qtsdk/?

regards,

squidge
28th December 2009, 11:17