Qt 4.7 compiling failure with Visual Studio 2010 (win32-msvc2010)



  • Hi,

    i am using Windows 7 Ultimate 64 bit (6.1.7600) on which I installed
    Visual Studio 2010 Version 10.0.30319.1 RTMRel
    Microsoft .NET Framework Version 4.0.30319 RTMRel
    Installed Version: Premium

    I downloaded qt-everywhere-src-4.7.0 and followed the instructions to build the library.
    In my Visual Studio x64 Cross Tools Command Prompt (2010), I called following commands:

    qt-everywhere-commercial-src-4.7.0>configure.exe -platform win32-msvc2010 -qt-style-windowsxp -release -static -commercial -fast -openssl -no-qt3support -sse -sse2 -D NOMINMAX -D WIN32_LEAN_AND_MEAN -D VC_EXTRA_LEAN -D WIN32 -D _WINDOWS -D _CRT_NONSTDC_NO_WARNINGS -D _CRT_SECURE_NO_WARNINGS -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE -D _HAS_ITERATOR_DEBUGGING=0 -D _SECURE_SCL=0 -D _ATL_SECURE_NO_DEPRECATE -D _CRT_NON_CONFORMING_SWPRINTFS -D STRSAFE_NO_DEPRECATE -D ACPL_USE_PROMOTED_HEADERS -D ACPL_USE_WINDOWS_COM_OBJECTS -D _UNICODE -D UNICODE

    qt-everywhere-commercial-src-4.7.0>nmake

    Compiling stops at qeventdispatcher_win.cpp with following error:

    kernel\qeventdispatcher_win.cpp(307) : error C2059: syntax error : '__cdecl'
    kernel\qeventdispatcher_win.cpp(308) : error C2059: syntax error : '__cdecl'
    kernel\qeventdispatcher_win.cpp(310) : error C2146: syntax error : missing ';' before identifier 'qtimeSetEvent'
    kernel\qeventdispatcher_win.cpp(310) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    kernel\qeventdispatcher_win.cpp(310) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    kernel\qeventdispatcher_win.cpp(311) : error C2146: syntax error : missing ';' before identifier 'qtimeKillEvent'
    kernel\qeventdispatcher_win.cpp(311) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    kernel\qeventdispatcher_win.cpp(311) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    kernel\qeventdispatcher_win.cpp(326) : error C2143: syntax error : missing ';' before 'QLibrary::resolve'
    kernel\qeventdispatcher_win.cpp(327) : error C2143: syntax error : missing ';' before 'QLibrary::resolve'
    kernel\qeventdispatcher_win.cpp(466) : error C3861: 'WSAGETSELECTEVENT': identifier not found
    kernel\qeventdispatcher_win.cpp(466) : error C2050: switch expression not integral
    kernel\qeventdispatcher_win.cpp(467) : error C2065: 'FD_READ' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(467) : error C2051: case expression not constant
    kernel\qeventdispatcher_win.cpp(468) : error C2065: 'FD_CLOSE' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(468) : error C2051: case expression not constant
    kernel\qeventdispatcher_win.cpp(469) : error C2065: 'FD_ACCEPT' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(469) : error C2051: case expression not constant
    kernel\qeventdispatcher_win.cpp(472) : error C2065: 'FD_WRITE' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(472) : error C2051: case expression not constant
    kernel\qeventdispatcher_win.cpp(473) : error C2065: 'FD_CONNECT' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(473) : error C2051: case expression not constant
    kernel\qeventdispatcher_win.cpp(476) : error C2065: 'FD_OOB' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(476) : error C2051: case expression not constant
    kernel\qeventdispatcher_win.cpp(479) : warning C4060: switch statement contains no 'case' or 'default' labels
    kernel\qeventdispatcher_win.cpp(603) : error C2065: 'TIME_CALLBACK_FUNCTION' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(603) : error C2065: 'TIME_PERIODIC' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(603) : error C2064: term does not evaluate to a function taking 5 arguments
    kernel\qeventdispatcher_win.cpp(622) : error C2064: term does not evaluate to a function taking 1 arguments
    kernel\qeventdispatcher_win.cpp(653) : error C2065: 'FD_READ' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(653) : error C2065: 'FD_CLOSE' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(653) : error C2065: 'FD_ACCEPT' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(655) : error C2065: 'FD_WRITE' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(655) : error C2065: 'FD_CONNECT' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(657) : error C2065: 'FD_OOB' : undeclared identifier
    kernel\qeventdispatcher_win.cpp(660) : error C3861: 'WSAAsyncSelect': identifier not found
    qcoreapplication_win.cpp
    kernel\qcoreapplication_win.cpp(112) : warning C4267: 'argument' : conversion from 'size_t' to 'DWORD', possible loss of data
    qwineventnotifier_p.cpp
    qsharedmemory_win.cpp
    qsystemsemaphore_win.cpp
    Generating Code...
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\MicrosoftVisualStudio10.0\VC\BIN\x86_amd64\cl.EXE"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\MicrosoftVisualStudio10.0\VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '""C:\Program' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '""C:\Program' : return code '0x2'
    Stop.

    Has someone had the same problem ? How do you fix it ?

    Thanks,
    Florent



  • I may tell you that I followed exactly those instructions:

    "http://doc.qt.nokia.com/4.7/install-win.html":http://doc.qt.nokia.com/4.7/install-win.html

    [edit: fixed link / chetankjain]



  • OK I found what was causing the trouble:

    -D WIN32_LEAN_AND_MEAN

    Do not define this one, otherwise you will get a lot of errors.



  • How do you @#undef@ine WIN32_LEAN_AND_MEAN? I'm having the same problem.


  • Moderators

    In chanivlad's first post you can see the configure.exe with all the options he used :

    @qt-everywhere-commercial-src-4.7.0>configure.exe -platform win32-msvc2010 -qt-style-windowsxp -release -static -commercial -fast -openssl -no-qt3support -sse -sse2 -D NOMINMAX -D WIN32_LEAN_AND_MEAN -D VC_EXTRA_LEAN -D WIN32 -D _WINDOWS -D..........@

    So just don't use
    @-D WIN32_LEAN_AND_MEAN@
    That's what he did.



  • [quote author="Eddy" date="1307165902"]So just don't use
    @-D WIN32_LEAN_AND_MEAN@[/quote]

    Oh. I didn't use it. Problem persists.


  • Moderators

    In that case your problem originates elsewhere.

    I suggest you start a new thread in which you explain exactly what you did and what errors you get.


Log in to reply
 

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