building qt 4.8.5

1. extract package to D:\Qt\4.8.5\
2. copy mysql include/lib to D:\Qt\MySQL
3. modify D:\Qt\4.8.5\mkspecs\win32-msvc2008
3.1 remove -Zc:wchar_t- from QMAKE_CFLAGS
4. open VS2008 command line, and run:
if build libs and tools:
  configure -platform win32-msvc2008 -debug-and-release -opensource -plugin-sql-sqlite -plugin-sql-mysql -nomake examples -nomake demos -nomake docs -nomake translations -I D:\Qt\mysql\include -l D:\Qt\mysql\lib\x86\libmysql
if build all except docs/translations:
  configure -platform win32-msvc2008 -debug-and-release -opensource -plugin-sql-sqlite -plugin-sql-mysql -nomake docs -nomake translations -I D:\Qt\mysql\include -l D:\Qt\mysql\lib\x86\libmysql
and run nmake
if built before, do run this firstly:
nmake confclean
further improvement:
1. use jom to improve the build speed
download from here:
for build. jom
for clean up: jom confclean
2. add incredibuild to commandline.
copy cl.exe to a new folder, and use lordpe or a similar tool to add import to xgInterop.dll
add the new folder before the VC\bin
for build. ibjom.cmd
for clean up: ibjom.cmd confclean

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s