Problem installing Qt 4.2.3 with MSVC 2005 express edition
I have been following the instructions here and here
I had trouble running winzip wizard to download qt so I had to just drag and drop into the c:\lib\qt\4.2.3 directory.
Then I applied the qt-win patch. That seemed to go fine.
I ran vsvars32.bat script to configure the environment for the VC++ 2005 compiler... Apparently all happiness and light.
then I ran
C:\lib\qt\4.2.3>qconfigure.bat msvc20005
from which I recieved a compiler error
.\project.cpp(42) : fatal error C1083: Cannot open include file: 'Windows.h': no such file or directory
I could see Windows.h in the Microsoft Include directory so I followed the suggestion above and ran the .bat with the include file explicitely specified.
>qconfigure.bat msvc2005 -I "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include -L "C:\Program Files \ Microsoft Platform SDK for Windows Server 2003 R2\Lib"
to no avail. The file still could not be found.
Thanks for your help.
JJ
PS from the command prompt window:
Include paths...............C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
Additional libraries........-LC:\Program Files\Microsoft Platform SDK for Window
s Server 2003 R2\Lib
Processing of project files have been disabled.
Only use this option if you really know what you're doing.
"Fixing qconfig.h"
1 file(s) copied.
Going to compile qmake now
Continue? (Y/N):y
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -FIqmake_pch.h -Yuqmake_pch.h -Fptmp\qmake_pch.pch -nologo -Zm200
-GS -O1 -MD -DNDEBUG -GR -EHsc -W3 -DUNICODE -DQT_LARGEFILE_SUPPORT -DWIN32 -D_C
RT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DQT_BUILD_QMAKE -DQT_BOOTSTR
APPED -DQT_NO_TEXTCODEC -DQT_NO_LIBRARY -DQT_NO_STL -DQT_NO_COMPRESS -DQT_NO_UNI
CODETABLES -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQMAKE_OPENSOURCE_EDITION -D
QT_NODLL -DQT_NO_THREAD -DQT_NO_QOBJECT -I"../src/corelib/arch/generic" -I"gener
ators" -I"generators\unix" -I"generators\win32" -I"generators\mac" -I"../include
" -I"../include/QtCore" -I"../src/3rdparty/md5" -I"../qmake" -I"..\mkspecs\win32
-msvc2005" -Fotmp\ @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nm5.tmp
project.cpp
.\project.cpp(42) : fatal error C1083: Cannot open include file: 'Windows.h': No
such file or directory
option.cpp
.\option.cpp(650) : fatal error C1083: Cannot open include file: 'windows.h': No
such file or directory
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
l.EXE"' : return code '0x2'
Stop.
Re: Problem installing Qt 4.2.3 with MSVC 2005 express edition
Follow this one: http://kjellkod.blogspot.com/2007/02...o-express.html
And you've tested any application with the windows header? Make sure you have installed the SDK.
Re: Problem installing Qt 4.2.3 with MSVC 2005 express edition
Thank you for this link. It looks like qconfigure.bat's -I and -L command line options are not working. The way the link gets around that problem is by adding them to the environment variables PATH, LIB, and INCLUDE set in vcvars32.bat.
Re: Problem installing Qt 4.2.3 with MSVC 2005 express edition
The -I and -L switches are not made to fix your build environment. They're only for 3rdparty libs like openssl or dbus...
Re: Problem installing Qt 4.2.3 with MSVC 2005 express edition
I tried to integrate qt with msvc2005 with instructions above, but after running nmake i got this error:
Code:
cl -c -FIqt_gui_pch.h -Yuqt_gui_pch.h -Fptmp\o
nologo -Zm200 -GS -O2 -MD -DNDEBUG -W3 -GR -EHs
-DUNICODE -DQT_LARGEFILE_SUPPORT -DWIN32 -D_CR
TDC_NO_DEPRECATE -DQT_BUILD_GUI_LIB -DQT_MAKEDL
I_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -
AGEENGINE -DQT_RASTER_PAINTENGINE -DQT_NO_CUPS
VE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_SSE2 -DQT_NO_F
STYLE_MAC -DQ_INTERNAL_QAPP_SRC -DQT_DLL -DQT_N
clude\QtCore" -I"..\..\include\QtCore" -I"..\..
-I"tmp" -I"..\3rdparty\wintab" -I"..\3rdparty\
ialogs" -I"..\..\include\ActiveQt" -I"tmp\moc\r
Qt4-shared\mkspecs\win32-msvc2005" -Fotmp\obj\r
LOCALS~1\Temp\nm685.tmp
zard_win_p.cpp
\release_shared\moc_qwizard_win_p.cpp(36) : err
a class or namespace name
\release_shared\moc_qwizard_win_p.cpp(41) : err
a class or namespace name
\release_shared\moc_qwizard_win_p.cpp(42) : err
s not allowed on nonmember functions
\release_shared\moc_qwizard_win_p.cpp(46) : err
a class or namespace name
\release_shared\moc_qwizard_win_p.cpp(50) : err
er 'QVistaHelper'
\release_shared\moc_qwizard_win_p.cpp(50) : err
'(' before identifier 'QVistaHelper'
\release_shared\moc_qwizard_win_p.cpp(51) : err
: illegal call of non-static member function
c:\qt-win-opensource-src-4.3.0\include\qtcore\
h(94) : see declaration of 'QObject::qt_metacas
\release_shared\moc_qwizard_win_p.cpp(54) : err
a class or namespace name
\release_shared\moc_qwizard_win_p.cpp(56) : err
: illegal call of non-static member function
c:\qt-win-opensource-src-4.3.0\include\qtcore\
h(94) : see declaration of 'QObject::qt_metacal fatal error U1077: 'cl' : return code '0x2'
fatal error U1077: '"C:\Program Files\Microsof
2003 R2\Bin\nmake.exe"' : return code '0x2'
fatal error U1077: 'cd' : return code '0x2'
in-opensource-src-4.3.0>
Re: Problem installing Qt 4.2.3 with MSVC 2005 express edition
Re: Problem installing Qt 4.2.3 with MSVC 2005 express edition
Can you share your environment variables.
Pete
Re: Problem installing Qt 4.2.3 with MSVC 2005 express edition
I followed the instructions on this site and have not had any problems using Qt with MSVC...
http://qtnode.net/wiki?title=Qt4_with_Visual_Studio
hope this helps,
Jonathan
Re: Problem installing Qt 4.2.3 with MSVC 2005 express edition
environment variables:
set INCLUDE=C:\Programme\Microsoft Visual Studio 8\VC\include;C:\Programme\Microsoft Platform SDK for Windows Server 2003 R2\Include
set LIB=C:\Programme\Microsoft Visual Studio 8\VC\lib;C:\Programme\Microsoft Platform SDK for Windows Server 2003 R2\Lib
everything seems to work when I enter that in the command prompt before running the qconfigure (see my link above).