PDA

View Full Version : Problem installing Qt 4.2.3 with MSVC 2005 express edition


jjhenjj
12th June 2007, 20:58
I have been following the instructions here (http://wiki.qgis.org/qgiswiki/Building_QT_4_with_Visual_C++_2005)and here (http://www.kdelibs.com/wiki/index.php/Building_KDElibs_4_using_MS_Visual_Studio)

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.

v3n0w
12th June 2007, 21:46
Follow this one: http://kjellkod.blogspot.com/2007/02/qt4-on-free-ide-visual-studio-express.html

And you've tested any application with the windows header? Make sure you have installed the SDK.

jjhenjj
15th June 2007, 10:27
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.

ChristianEhrlicher
15th June 2007, 17:40
The -I and -L switches are not made to fix your build environment. They're only for 3rdparty libs like openssl or dbus...

Sepidar
22nd June 2007, 11:00
I tried to integrate qt with msvc2005 with instructions above, but after running nmake i got this error:


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>

ChristianEhrlicher
22nd June 2007, 11:06
Forum search for QVistaHelper: http://www.qtcentre.org/forum/f-installation-5/t-qt430-build-on-winxp-sp2-using-vc2003-qvistahelper-7589.html/?highlight=QVistaHelper

pdolbey
9th July 2007, 12:47
Can you share your environment variables.

Pete

JonathanForQT4
11th July 2007, 15:18
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

JonathanForQT4
12th July 2007, 14:57
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).