[solved] Configure.exe fails for Qt 4.7.3 with Visual Studio-compiler

  • I want to build Qt with the VS2010 compiler but ran into a problem while configuring.

    I'm using the VS-command-shell.
    My configure-command looks like this:

    @configure.exe -platform win32-msvc2010 -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-multimedia -no-qt3support@

    This happens like a second after starting configure.
    Waht is going wrong?

    @C:\qt-everywhere-opensource-src-4.7.3\qmake\qbitarray.obj couldn't be found
    del project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_m
    ake.obj option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj
    makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj borland_bmake.
    obj msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj msvc_objectmodel.obj msbuil
    d_objectmodel.obj symmake.obj initprojectdeploy_symbian.obj symmake_abld.obj sy
    mmake_sbsv2.obj symbiancommon.obj registry.obj epocroot.obj
    C:\qt-everywhere-opensource-src-4.7.3\qmake\project.obj couldn't be found
    del qmake_pch.obj
    C:\qt-everywhere-opensource-src-4.7.3\qmake\qmake_pch.obj couldn't be found
    del qmake_pch.pch
    C:\qt-everywhere-opensource-src-4.7.3\qmake\qmake_pch.pch couldn't be found
    del qsystemlibrary.obj
    C:\qt-everywhere-opensource-src-4.7.3\qmake\qsystemlibrary.obj couldn't be found
    del vc60.pdb
    C:\qt-everywhere-opensource-src-4.7.3\qmake\vc60.pdb couldn't be found
    del vc70.pdb
    C:\qt-everywhere-opensource-src-4.7.3\qmake\vc70.pdb couldn't be found
    del qmake.pdb
    C:\qt-everywhere-opensource-src-4.7.3\qmake\qmake.pdb couldn't be found
    del qmake.ilk
    C:\qt-everywhere-opensource-src-4.7.3\qmake\qmake.ilk couldn't be found
    del qmake.tds
    C:\qt-everywhere-opensource-src-4.7.3\qmake\qmake.tds couldn't be found

    Microsoft (R) Program Maintenance Utility, Version 10.00.30319.01
    Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

        cl -c -Fo./  -W3 -nologo -O2  /MP  -I. -Igenerators -Igenerators\unix -I

    generators\win32 -Igenerators\mac -Igenerators\symbian -IC:\qt-everywhere-opens
    ource-src-4.7.3\include -IC:\qt-everywhere-opensource-src-4.7.3\include\QtCore
    -IC:\qt-everywhere-opensource-src-4.7.3\include -IC:\qt-everywhere-opensource-sr
    c-4.7.3\include\QtCore -IC:\qt-everywhere-opensource-src-4.7.3\src\corelib\glob
    al -IC:\qt-everywhere-opensource-src-4.7.3\src\corelib\xml -IC:\qt-everywhere-
    opensource-src-4.7.3\mkspecs\win32-msvc2008 -IC:\qt-everywhere-opensource-src-
    TP qmake_pch.h
    lobal.h(45) : fatal error C1083: File (Include) couldn't be opened: "st
    ddef.h": No such file or directory
    NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\cl.EXE"": return code "0x2"
    Building qmake failed, return code 2@

  • Moderators

    How did you open the Command Prompt?
    With older versions of Visual Studio, you have to open the command prompt from Visual Studio.
    Tools->Visual Studio 2005 Command Prompt
    for VS 2005

    Added: Sorry, overlooked that you have done that.

  • I opened it via start-menu. There's an entry for that under Microsoft Visual Studio 2010->Visual Studio Tools

  • Moderators

    Unfortunately, I have seen just after posting.
    This addition came too late.
    [quote author="koahnig" date="1305709701"]Added: Sorry, overlooked that you have done that.[/quote]

  • Moderators

    Just out of curiousity I have started the same configure command but substituted the visual studio version.
    It does work in my installation.
    The qbitarray.obj is created apparently right the beginning.
    I have used "qt-everywhere-opensource-src-4.7.3.zip".

  • What do you mean by substituted? You left it out?

  • Moderators

    No, I have basically used the configure command as you provided, but I had to use "win32-msvc2005" instead of "win32-msvc2010".

  • It's the same error with win32-msvc2005 as well.

  • Maybe you can try this

    Check your system settings

    @ QTDIR = C:\qt-everywhere-opensource-src-4.7.3
    QMAKESPEC = win32-msvc2010
    PATH = .....;%QTDIR%\bin@

    launch Visual Studio 2010 Command Prompt

    check variable with the following commands
    @ echo %QTDIR%
    echo %QMAKESPEC%
    echo %PATH%@

    then run this :
    @cd %QTDIR%
    configure & nmake & nmake clean@

  • I did exactly what you said (and made sure the variables are set) but it still can't find stddef (same error as before).

    btw. what means the & between configure & nmake & nmake clean?

  • EDIT: The requested libraries weren't found...link %PATH% with /include/ folder which has STL libs.(not so good solution)...

  • I can't find VC 2010's include-folder.

  • It has to exists. Run in VC some console app. and look at project properties (If V. Visual C++ or Visual Studio uses MSVC headers which are almost ever in Program Files dir. Look for something like
    Program Files/Microsoft SDKs/Windows/(current version - the latest - I've got "v7.0A")/Include

    Try it...

  • Do you have installed QtSDK + MSVC 2008 ??

    You work in QtCreator? Have you tried working with MSVC compiler in QtCreator? I am even better with MSVC than MinGW...

  • Ah, now I found it and added it to the PATH.
    I tstill get the same error as in the first post though.

    I've got QtSDK and MSVC2010 installed.

  • QtSDK has libs/includes only for MSVC2008, set up in QtCreator, in Project, and set up compiler as MSVC2008

  • where are these includes. I can't find them in the source-package and compiled sdk.

  • QtSDK\Desktop\Qt\4.7.3\msvc2008

  • Ah...I started the QtSDK Maintenance tool and saw I didn't have those isntalled.

    btw. Will this help me get Qt itself compiled?

  • I've got this compiled, it works fine for me, better than MinGW (for me)...

    I am sorry, I don't understand you question...

  • Have you really need VS2010 ?
    Have you really need to compile Qt? or just want it works on Windows ?

    If your answers is no, no , yes , see my last post here

    bq. Just few comment ...

  • What is the Boost? Some turbo??

  • [quote author="Hedge" date="1305716471"]I did exactly what you said (and made sure the variables are set) but it still can't find stddef (same error as before).

    btw. what means the & between configure & nmake & nmake clean?[/quote]

    it chains the commands.
    it's the same thing that:

  • there is something weird in your description:
    according to your configuration ( platform win32- msvc2010 ) you wanted it configured for VS2010, but according to the compiler arguments ( IC:\qt-everywhere-
    opensource-src-4.7.3\mkspecs\win32- msvc2008 ), it's been configured for VS2008 ???

    directly after agreeing to the LGPL policies, the standard include paths are listed:
    @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?

      c:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE
      c:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE
      C:\Program Files\Microsoft SDKs\Windows\v6.0A\include @

    look there, stddef.h normally is located within "c:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE"
    (for your configuration, the Visual Studio version number might be different)

  • @gedd:
    I want to make the Qt-dlls I deliver with my program a bit smaller. I heard good things about the MS-compiler. That's the thread with my current results: http://developer.qt.nokia.com/forums/viewthread/6038/P15/#35944

    @Peppy: I want to compile the Qt libraries with it, not my application.

    @joergs1968: I might have not installed the C++ compiler (I just remembered) because I only used VS for C# up until now. I'm downloading the VS2010 iso from MSDNAA right now to change the installation.

  • @Hedge: It should work in MSVC compiler. I am using MSVC 2008 with QtCreator, is much less painful (ehm...I could say, it's not painful :-D ;) ) and it does its work very fast (with precompiled headers and incremental libs) :) ... That is one thing, that is really good from Microsoft (Yes, I've tried VS 2008 - great system, too), but let's get back to the topic...

    Our problem is to find, which include headers are right for compiling (stddef.h is in STL, so it should be the same, but who knows :-))

  • @joergs1968: I might have not installed the C++ compiler (I just remembered) because I only used VS for C# up until now. I'm downloading the VS2010 iso from MSDNAA right now to change the installation.[/quote]

    sounds like a reasonable explanation of the symptoms - good luck!

    BTW: I for myself tried the Qt compilation with VS2010 (Windows7 x64 architecture) - no success; some demos worked, but not everything (strange thing tho: in debug mode everthing works, this makes it impossible to track down the problem)...

    you should stick to VS2008 - I think VS2010 is a bit too new at the moment

  • [quote author="joergs1968" date="1305725258"]...
    you should stick to VS2008 - I think VS2010 is a bit too new at the moment[/quote]

    Not so in fact ...
    And QMAKESPEC for 2010, 2008 and 2005 are the same

    qplatformdefs.h for VS2010 and VS2008 contains this

    @#include "../win32-msvc2005/qplatformdefs.h"@

    I tried and succeeded to use Qt with VS 2010, you have just to compile Qt dll.
    Using VS2008 with SDK 1.1 is easier and faster

  • ...but that's only from Qt perspective - the compiler/linker used by VisualStudio 2008/2010 are different; actually that is what I meant...

    my problems might be caused because I am compiling for x64 architecture, don't know :-(
    (the concrete problems actually are: the phonon_....dll crashes and every dropdown-list-button causes a read from address 0 somewhere in QtGui4.dll; apart from that, most examples/demos work in release mode, in debug mode: everything works...)

  • After install C++ it worked finally.

    I can't tell yet whether the dll's I compiled will work b/c I can't test my application right now.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.