Howto build qt lib with stlport on windows
Added by molator almost 5 years ago
Thank you to Kervala.
For this howto, i will use the Windows XP folder Program Files.
Replace it for Windows Vista or 7.
What you need¶
- Microsoft Visual Studio C++ 2008 Express Editions with SP1
Download vcsetup.exe
- Microsoft .NET Framework 4
- Microsoft Windows SDK
Working too with Windows XP SP2
- Qt source for Windows (VS2008)
http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.3.zip
- stlport (ryzom core external lib)
https://sourceforge.net/projects/ryzom/files/external_stlport_lua51.7z/download
I will assume that you install stlport in c:\external
Download and install all.
Set up everything¶
- Microsoft Windows SDK settings
Copy c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd to c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnvWithStlport.cmd
Edit c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnvWithStlport.cmd
Edit the following lines and add your path to stlport :
SET "VCIncludes=c:\external\include\stlport;c:\external\include;%VCINSTALLDIR%INCLUDE"
SET "LIB=c:\external\lib;%VCLibraries%;%OSLibraries%;%FxTools%;%LIB%"
SET "LIB=c:\external\lib64;%VCLibraries%\amd64;%OSLibraries%\X64;%LIB%"
- Qt settings
Edit the system variable PATH and add :
c:\Qt\4.6.3\bin
Create a systeme variable QTLIB with the following value :
c:\Qt\4.6.3\lib
Edit c:\Qt\4.6.3\src\3rdparty\clucene\src\CLucene\config\CompilerMsvc.h and comment 4 lines as following :
//#if (_MSC_VER < 1310)
#define CL_NS_HASHING(func) std::func //the namespace is different on VC 7.0
//#else
// #define CL_NS_HASHING(func) stdext::func
//#endif
Build¶
- Build qmake with stl (not stlport)
Open a MSDOS console
Go to Qt folder :
cd c:\Qt\4.6.3\
Load default SDK environment :
c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd
Configure Qt :
configure
Build qmake :
nmake
As soon as qmake is built, stop the build with CTRL + C
- Build qt lib with stlport
Open a MSDOS console
Go to Qt folder :
cd c:\Qt\4.6.3\
Load SDK environment with stlport :
c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnvWithStlport.cmd
Clean the previous config
nmake confclean
Configure Qt for stlport :
configure -no-qmake -no-qt3support -qt-zlib -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -openssl -I c:\external\include\openssl -no-exceptions -no-rtti -no-style-cde -no-style-motif -no-style-cleanlooks -no-style-plastique
Replace c:\external\include\openssl with your own path in the command line.
Build all except qmake :
nmake
It takes hours to build the lib.
Here a compact version of the result :
http://docs.google.com/leaf?id=0B3LX3q7MsUEGMGJiYmI1OGUtY2YzNy00YzVlLTk1NjMtMDU0MmY3ZDVlOTZi&hl=fr
That's all folks!