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:
Qt Code:
  1. cd C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools
  2. call vsvars32.bat
  3. cd C:\Qt\3.1.2_2010\src
  4. 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
To copy to clipboard, switch view to plain text mode 


And the result is:
Qt Code:
  1. Generating Code...
  2. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
  3. N\cl.EXE"' : return code '0x2'
  4. Stop.
To copy to clipboard, switch view to plain text mode 

I see in some forums that I should add /I to nmake command (I execute "nmake /I"). Then the result is:
Qt Code:
  1. cl -c -nologo -Zm200 -W3 -MDd -Z7 -DQT_SHARED -DQT_THREAD_SUPPORT -DQT_A
  2. CCESSIBILITY_SUPPORT -DUNICODE -DQT_THREAD_SUPPORT -DQT_NO_CUPS -DQT_NO_NIS -DQT
  3. _NO_IMAGEIO_MNG -DQT_NO_IMAGEIO_JPEG -DQT_BUILTIN_GIF_READER=1 -DQT_NO_STYLE_MAC
  4. -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYL
  5. E_COMPACT -DQT_DLL -DQT_MAKEDLL -I"tmp" -I"3rdparty\libpng" -I"3rdparty\zlib" -I
  6. "C:\Qt\3.1.2_2010\include" -I"C:\Qt\3.1.2\src" -I"tmp\moc\debug_mt_shared\\" -I"
  7. C:\Qt\3.1.2_2010\mkspecs\win32-msvc" -Fotmp\obj\debug_mt_shared\ @C:\DOCUME~1\BI
  8. SERR~1\LOCALS~1\Temp\nm37E.tmp
  9. qapplication_win.cpp
  10. c:\qt\3.1.2_2010\include\qcstring.h(61) : warning C4996: 'strcpy': This function
  11. or variable may be unsafe. Consider using strcpy_s instead. To disable deprecat
  12. ion, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  13. C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(105) :
  14. see declaration of 'strcpy'
  15. c:\qt\3.1.2_2010\include\qcstring.h(86) : warning C4996: 'strcpy': This function
  16. or variable may be unsafe. Consider using strcpy_s instead. To disable deprecat
  17. ion, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  18. C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(105) :
  19. see declaration of 'strcpy'
  20. C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\xlocale(323) : warning
  21. C4530: C++ exception handler used, but unwind semantics are not enabled. Specify
  22. /EHsc
  23. kernel\qapplication_win.cpp(126) : fatal error C1083: Cannot open include file:
  24. 'winable.h': No such file or directory
  25. qaccessible_win.cpp
  26. c:\qt\3.1.2_2010\include\qcstring.h(61) : warning C4996: 'strcpy': This function
  27. or variable may be unsafe. Consider using strcpy_s instead. To disable deprecat
  28. ion, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  29. C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(105) :
  30. see declaration of 'strcpy'
  31. c:\qt\3.1.2_2010\include\qcstring.h(86) : warning C4996: 'strcpy': This function
  32. or variable may be unsafe. Consider using strcpy_s instead. To disable deprecat
  33. ion, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  34. C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(105) :
  35. see declaration of 'strcpy'
  36. C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\xlocale(323) : warning
  37. C4530: C++ exception handler used, but unwind semantics are not enabled. Specify
  38. /EHsc
  39. kernel\qaccessible_win.cpp(42) : fatal error C1083: Cannot open include file: 'w
  40. inable.h': No such file or directory
  41. Generating Code...
  42. link /NOLOGO /DEBUG /BASE:0x39D00000 /DELAYLOAD:opengl32.dll /SUBSYSTEM:
  43. windows /DLL /incremental:no /VERSION:3.12 /LIBPATH:"C:\Qt\3.1.2_2010\lib" /OUT:
  44. C:\Qt\3.1.2_2010\lib\qt-mt312.dll @C:\DOCUME~1\BISERR~1\LOCALS~1\Temp\nm37F.tmp
  45.  
  46. LINK : fatal error LNK1181: cannot open input file 'tmp\obj\debug_mt_shared\qapp
  47. lication_win.obj'
  48. copy C:\Qt\3.1.2_2010\lib\qt-mt312.dll ..\bin
  49. The system cannot find the file specified.
To copy to clipboard, switch view to plain text mode 

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