PDA

View Full Version : Rebuild QT 3.1.2 with VS2010



rangbis
16th June 2011, 13:01
Hello,

I have to rebuild QT 3.1.2 with Visual Studio 2010. This version is very old but our team wants to keep on working with it.

I am using QMAKESPEC=win32-msvc.net (but I have tested with win32-msvc, and I try to compose win32-msvc2010)
Path += C:\Qt\3.1.2_2010\bin

I have removed older VSs from Path (and rename their folders).
I am starting C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat
So my actions are below:


cd C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools
call vsvars32.bat
cd C:\Qt\3.1.2_2010\src
configure.exe -debug -shared -thread -enable-network -enable-canvas -enable-table -enable-xml -enable-opengl -enable-sql -enable-iconview -enable-workspace -enable-styles -enable-dialogs -enable-widgets -enable-tools -enable-kernel -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-tds -accessibility -big-codecs -no-tablet -stl -exceptions -rtti -qt-imgfmt-png -qt-png -qt-imgfmt-jpeg -qt-jpeg -plugin-imgfmt-mng -qt-mng -no-gif -qt-style-windows -no-style-windowsxp -plugin-style-motif -plugin-style-platinum -plugin-style-motifplus -plugin-style-cde -plugin-style-sgi




And the result is:


Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\cl.EXE"' : return code '0x2'
Stop.


I see in some forums that I should add /I to nmake command (I execute "nmake /I"). Then the result is:


cl -c -nologo -Zm200 -W3 -MDd -Z7 -DQT_SHARED -DQT_THREAD_SUPPORT -DQT_A
CCESSIBILITY_SUPPORT -DUNICODE -DQT_THREAD_SUPPORT -DQT_NO_CUPS -DQT_NO_NIS -DQT
_NO_IMAGEIO_MNG -DQT_NO_IMAGEIO_JPEG -DQT_BUILTIN_GIF_READER=1 -DQT_NO_STYLE_MAC
-DQT_NO_STYLE_AQUA -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYL
E_COMPACT -DQT_DLL -DQT_MAKEDLL -I"tmp" -I"3rdparty\libpng" -I"3rdparty\zlib" -I
"C:\Qt\3.1.2_2010\include" -I"C:\Qt\3.1.2\src" -I"tmp\moc\debug_mt_shared\\" -I"
C:\Qt\3.1.2_2010\mkspecs\win32-msvc" -Fotmp\obj\debug_mt_shared\ @C:\DOCUME~1\BI
SERR~1\LOCALS~1\Temp\nm37E.tmp
qapplication_win.cpp
c:\qt\3.1.2_2010\include\qcstring.h(61) : warning C4996: 'strcpy': This function
or variable may be unsafe. Consider using strcpy_s instead. To disable deprecat
ion, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(105) :
see declaration of 'strcpy'
c:\qt\3.1.2_2010\include\qcstring.h(86) : warning C4996: 'strcpy': This function
or variable may be unsafe. Consider using strcpy_s instead. To disable deprecat
ion, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(105) :
see declaration of 'strcpy'
C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\xlocale(323) : warning
C4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc
kernel\qapplication_win.cpp(126) : fatal error C1083: Cannot open include file:
'winable.h': No such file or directory
qaccessible_win.cpp
c:\qt\3.1.2_2010\include\qcstring.h(61) : warning C4996: 'strcpy': This function
or variable may be unsafe. Consider using strcpy_s instead. To disable deprecat
ion, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(105) :
see declaration of 'strcpy'
c:\qt\3.1.2_2010\include\qcstring.h(86) : warning C4996: 'strcpy': This function
or variable may be unsafe. Consider using strcpy_s instead. To disable deprecat
ion, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(105) :
see declaration of 'strcpy'
C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\xlocale(323) : warning
C4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc
kernel\qaccessible_win.cpp(42) : fatal error C1083: Cannot open include file: 'w
inable.h': No such file or directory
Generating Code...
link /NOLOGO /DEBUG /BASE:0x39D00000 /DELAYLOAD:opengl32.dll /SUBSYSTEM:
windows /DLL /incremental:no /VERSION:3.12 /LIBPATH:"C:\Qt\3.1.2_2010\lib" /OUT:
C:\Qt\3.1.2_2010\lib\qt-mt312.dll @C:\DOCUME~1\BISERR~1\LOCALS~1\Temp\nm37F.tmp

LINK : fatal error LNK1181: cannot open input file 'tmp\obj\debug_mt_shared\qapp
lication_win.obj'
copy C:\Qt\3.1.2_2010\lib\qt-mt312.dll ..\bin
The system cannot find the file specified.


And qapplication.obj has been created, qapplication_win.obj has been not.

(maybe I need a detail step by step algorithm for building QT)
Can someone help me to build this QT 3.1.2?


Biser Rangelov

Lesiok
16th June 2011, 17:39
Google don't bite :) I found this :
WinAble.h is no longer distributed in the Windows SDK for Vista. You should be able to use WinUser.h instead.