PDA

View Full Version : MSVS2010 Proffesional - Cmd - Qt Community Edition SRC - Failure to Build 4.6.1



DaneAU
1st May 2011, 15:40
Hi All,

I am having some issues building Qt from SRC on Windows. I downloaded the

qt-everywhere-opensource-src-4.6.1.zip

I have hunted around the internet trying to solve my issue, to no avail. Just to get things organised this is the current specifications of my setup.

Os : Windows 7 Professional x64
Visual Studio 2010 Professional
Active State Perl ~ installed and configured

My path is setup with the aid of This Guide (http://dcsoft.wordpress.com/2010/01/30/how-to-setup-qt-4-5-visual-studio-integration), the relevant commands such as nmake work as expected within cmd.

Now i have extracted the qt-community .zip contents into
C:\qt\qt461vc

As such this is where my QTDIR environmental variable is set to, i have also toyed around with just adding the directory to the PATH, this did not change anything i could see.

So in the root of Qt i execute configure and it spits out a lot of information. I will explain the process as follows.



c:\qt\qt461vc>configure
Which edition of Qt do you want to use ?
Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.
o

This is the Qt for Windows Open Source Edition.

You are licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) version 2.1
or the GNU General Public License (GPL) version 3.

Type '3' to view the GNU General Public License version 3 (GPLv3).
Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1).
Type 'y' to accept this license offer.
Type 'n' to decline this license offer.

Do you accept the terms of the license?
y
All the required DirectShow/Direct3D files couldn't be found.
Make sure you have either the platform SDK AND the DirectShow SDK or the Windows SDK installed.
If you have the DirectShow SDK installed, please make sure that you have run the <path to SDK>\SetEnv.Cmd script.
vmr9.h not found
dshow.h not found
strmiids.lib not found
dmoguids.lib not found
msdmo.lib not found
d3d9.h not found
Environment:
INCLUDE=
Unset
LIB=
Unset
PATH=
C:\Perl\site\bin
C:\Perl\bin
c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\
c:\Program Files\Microsoft SQL Server\100\Tools\Binn\
c:\Program Files\Microsoft SQL Server\100\DTS\Binn\
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools
C:\development\platforms\java\jdk\bin
C:\development\libraries\java\qtjambi-4.6.3\bin
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
C:\qt\qt461\bin
C:\qt\qt461vc\src
C:\qt\qt461vc\include
C:\qt\qt461vc\lib
C:\qt\qt461vc\qmake\generators
You are licensed to use this software under the terms of the GNU GPL version 3.You are licensed to use this software under th
e terms of the Lesser GNU LGPL version 2.1.
See C:/qt/qt461vc3

or C:/qt/qt461vcL

Configuration:
minimal-config
small-config
medium-config
large-config
full-config
build_all
debug
Qt Configuration:
release
debug
zlib
png
accessibility
qt3support
opengl
s60
ipv6
script
scripttools
multimedia
multimedia
audio-backend
native-gestures
svg
minimal-config
small-config
medium-config
large-config
full-config

QMAKESPEC...................win32-msvc (detected)
Architecture................windows
Maketool....................nmake
Debug symbols...............yes
Link Time Code Generation...no
Accessibility support.......yes
STL support.................yes
Exception support...........yes
RTTI support................yes
MMX support.................no
3DNOW support...............no
SSE support.................no
SSE2 support................no
IWMMXT support..............no
OpenGL support..............yes
OpenVG support..............no
OpenSSL support.............no
QtDBus support..............no
QtXmlPatterns support.......no
Phonon support..............no
QtMultimedia support........yes
WebKit support..............no
Declarative support.........no
QtScript support............yes
QtScriptTools support.......yes
Graphics System.............raster
Qt3 compatibility...........yes

Third Party Libraries:
ZLIB support............qt
GIF support.............plugin
TIFF support............plugin
JPEG support............plugin
PNG support.............qt
MNG support.............plugin
FreeType support........no

Styles:
Windows.................yes
Windows XP..............no
Windows Vista...........no
Plastique...............yes
Cleanlooks..............yes
Motif...................yes
CDE.....................yes
Windows CE..............no
Windows Mobile..........no
S60.....................no

Sql Drivers:
ODBC....................no
MySQL...................no
OCI.....................no
PostgreSQL..............no
TDS.....................no
DB2.....................no
SQLite..................plugin (qt)
SQLite2.................no
InterBase...............no

Sources are in..............C:\qt\qt461vc
Build is done in............C:\qt\qt461vc
Install prefix..............C:\qt\qt461vc
Headers installed to........C:\qt\qt461vc\include
Libraries installed to......C:\qt\qt461vc\lib
Plugins installed to........C:\qt\qt461vc\plugins
Binaries installed to.......C:\qt\qt461vc\bin
Docs installed to...........C:\qt\qt461vc\doc
Data installed to...........C:\qt\qt461vc
Translations installed to...C:\qt\qt461vc\translations
Examples installed to.......C:\qt\qt461vc\examples
Demos installed to..........C:\qt\qt461vc\demos

Running syncqt...

Then there is a significant pause, as somethinng runs in the background followed by the following.


Creating qmake...

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

cl -c -Foproject.obj -W3 -nologo -O2 -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igener
ators\symbian -IC:\qt\qt461vc\include -IC:\qt\qt461vc\include\QtCore -IC:\qt\qt461vc\include -IC:\qt\qt461vc\include\QtCore
-IC:\qt\qt461vc\src\corelib\global -IC:\qt\qt461vc\src\corelib\xml -IC:\qt\qt461vc\mkspecs\win32-msvc -DQT_NO_TEXTCODEC
-DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_Q
MAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED -DQMAKE_OPENSOU
RCE_EDITION project.cpp
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.EXE"' : return code '0xc0000135'
Stop.

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

del qbitarray.obj
Could Not Find C:\qt\qt461vc\qmake\qbitarray.obj

// .. etc for lots of del



Now the Could Not Find output statements are part of the Makefile clean, so they are to be expected when the build completely fails.

As a result i am reasonably sure the issue lies with the building of qmake, ie. this section of code.



Creating qmake...

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

cl -c -Foproject.obj -W3 -nologo -O2 -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igener
ators\symbian -IC:\qt\qt461vc\include -IC:\qt\qt461vc\include\QtCore -IC:\qt\qt461vc\include -IC:\qt\qt461vc\include\QtCore
-IC:\qt\qt461vc\src\corelib\global -IC:\qt\qt461vc\src\corelib\xml -IC:\qt\qt461vc\mkspecs\win32-msvc -DQT_NO_TEXTCODEC
-DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_Q
MAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED -DQMAKE_OPENSOU
RCE_EDITION project.cpp
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.EXE"' : return code '0xc0000135'
Stop.

A lot of people seem to be having this issue, however i am yet to resolve it through the numerous suggestions to check and fix the PATH Environmental Variables and Visual Studio Variables. I remember why i spend most of my time on Linux these days.

I should not during the configure i have also tried passing in the relevant -I and -L parameters, for the Windows SDK, however nothing has worked up until this point.

squidge
1st May 2011, 16:47
Do you open a visual studio command prompt to do the above or a standard command prompt? The former sets everything up to run CL, whereas the later doesn't and can cause the 0xc0000135 error (which means "Application could not initialise")

DaneAU
1st May 2011, 17:44
I have tried both, basically every permutation i can. I installed VS 2008 instead and got a little further this time. I am currently just completely removing both versions of Visual Studio off my WinPC, resetting all the Env Vars to do a singular install of VS2008 Professional.

I noticed in the very first blip of information that there are extra libraries required. Subsequently i am going to work progressively to install the required products and ensure everything is 100% correct.



All the required DirectShow/Direct3D files couldn't be found.
Make sure you have either the platform SDK AND the DirectShow SDK or the Windows SDK installed.
If you have the DirectShow SDK installed, please make sure that you have run the <path to SDK>\SetEnv.Cmd script.
vmr9.h not found
dshow.h not found
strmiids.lib not found
dmoguids.lib not found
msdmo.lib not found
d3d9.h not found
Environment:
INCLUDE=
Unset
LIB=
Unset
PATH=
C:\Perl\site\bin
C:\Perl\bin
c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\
c:\Program Files\Microsoft SQL Server\100\Tools\Binn\
c:\Program Files\Microsoft SQL Server\100\DTS\Binn\
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools
C:\development\platforms\java\jdk\bin
C:\development\libraries\java\qtjambi-4.6.3\bin
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
C:\qt\qt461\bin
C:\qt\qt461vc\src
C:\qt\qt461vc\include
C:\qt\qt461vc\lib
C:\qt\qt461vc\qmake\generators

So the statement

Make sure you have either the platform SDK AND the DirectShow SDK or the Windows SDK installed.
Is quite ambiguous, i have the Windows SDK installed and it has not helped. :/

Apparently the DirectShow is provided in the Platform SDK and DirectX SDK

DaneAU
3rd May 2011, 16:08
Ok i still have not resolved the issues.

I can confirm i have the Windows Platform SDK and the Direct-X SDK (June 2010) installed.

I have executed the dx_setenv.cmd in the DirectX SDK and in my System Environmental Variables i have DXSDK_DIR set to

C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\

I do not however have any entry referring to the Platform SDK.

The headers and libs


vmr9.h not found
dshow.h not found
strmiids.lib not found
dmoguids.lib not found
msdmo.lib not found
d3d9.h not found
are contained within the sdk in the following folders and the DirectX include folders


C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0\Lib
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0\Includes

Should there be an entry in my environmental variables for the platform SDK. I have run the SetEnv.cmd and also SetReg.exe just for the hell of it


I would really like to get this sorted, if anyone can make a valid suggestion i would be most appreciative :)

I have tried manually passing the locations using a command such as


configure -platform win32-msvc -prefix "C:\qt\qt-shared" -shared -I "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include" -L "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib" -I "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0\Include" -L "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0\Lib"

However this does not seem to work. I can't work out where the configure is searching for the locations of the required libraries. Would it be something in the registry or an env var ??


The error has changed, to the following now



cl -c -Foproject.obj -W3 -nologo -O2 -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igener
ators\symbian -IC:\qt\qtsrc\include -IC:\qt\qtsrc\include\QtCore -IC:\qt\qtsrc\include -IC:\qt\qtsrc\include\QtCore -IC:\q
t\qtsrc\src\corelib\global -IC:\qt\qtsrc\src\corelib\xml -IC:\qt\qtsrc\mkspecs\win32-msvc -DQT_NO_TEXTCODEC -DQT_NO_UNICO
DETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_T
HREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED -DQMAKE_OPENSOURCE_EDITION pr
oject.cpp
project.cpp
project.cpp(62) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
Building qmake failed, return code 2


Cannot find windows.h, funny thing is that it resides in the specified include directory :mad:

DaneAU
4th May 2011, 17:18
I got around the missing includes and library files by modifying the environmental variables. Courtesy of some help over at MSDN

I added to my User Environmental Variables to Following


Variable=INCLUDE
Value=<path to directx-sdk\Include>;<path to platform-sdk\Include>




Variable=LIB
Value=<path to directx-sdk\Lib>;<path to platform-sdk\Lib>


This got me so far, i am stilling having a few issues building as it is now saying after qmake.exe is created that there is an error determining MAKESPEC

I will deal with this in one moment :)

wysota
4th May 2011, 17:24
There is no "win32-msvc" platform. You should pass "win32-msvc2008" or "win32-msvc2010" as the platform name.

DaneAU
5th May 2011, 05:25
Yep thanks for that, i worked that one out :)

Also had to add the bin folder of Platform SDK to my PATH environmental variable because mt.exe is used :)