compiling qt-4.8.x Debug version on Windows platform considerationsJump to: Navigation, search
Directory
- 1 Why would you like to compile qt-4.8.x's Windows Debug Edition?
- 2 1 selection of MSVC versions
- 3 2 WinRAR's problem
- 4 3 Qmake sub-item cropping
- 5 4 Commissioning Qtwebkit
|
0 Why would you like to compile qt-4.8.x's Windows Debug Edition?
Purpose: To facilitate the debugging of QT code! VS is much better than the Linux gdb.
1 selection of MSVC versions
It is best to use vs2008+, which has its own installation package with the Windows SDK, and does not use outdated VS2005 (which requires additional Windows SDK installation)
Note: The latest version is already qt-4.8.6, and the WinCE precompiled version is officially released. It seems that Digia has solved the problem of cross-compiling of the ICU library on wince? (Pending confirmation)
note2:vs2008+ (VS2010, even VS2012, VS2013) seem to have brought their own Windows SDK by default, unlike 2005, which requires a separate installation.
2 WinRAR's problem
Extract from compressed package qt-everywhere-opensource-src-4.8.2.tar.gz:
--if there is a problem with the WinRAR program, it may cause the extracted file name to become *.cpp0000644, using a Ruby script to batch fix this problem (need to install Ruby 1.9.3 runtime Environment)
# Recursive Scan a dir, & perform each-file rename operation:def batch_files_from_dir (basepath) sub_dirs = ARRAY.N EW dir.new (basepath). Entries.each {|subpath| Path = File.join (BasePath, subpath) if File.file? ( Path) then if/0000[0-9]{3}$/.match (path) then puts "#{path}" ) file.rename (Path, New_path ) puts "\ t--->#{new_path}" end elsif subpath!= "." and subpath!= "." and file.directory? ( Path) then batch_files_from_dir (path) end }endargv.each{|path| Batch_files_from_dir (Path)}
3 Qmake sub-item cropping
- Enter cmd, enter command line environment
- Run the VC Vsvarsall.bat script that comes with Visual Studio and automatically configure the environment parameters (QT Configure need to call CL to do the compilation test)
- Run Configure first:
-
command line:
configure-debug-opensource-no-qt3support-platform Win32-msvc2008-webkit-debu G-NO-S60
-
let qmake generate all the *.vcproj (vs project files) for all QT projects
- Remove the demos, tools, examples, docs, translations modules (#注释掉对应行) from Projects.pro and run the Configure again.
-
This affects the resulting projects.sln so that it contains only the necessary sub-project modules
-
If you do not delete at this time, the default generated Projects.sln will contain all. Pro corresponding. vcproj sub-projects, resulting in unnecessary The compilation to be compiled.
- Open Projects.sln with VS2008, the default startup project is bootstrap. Join Demos/browser, Qtuitools 2 items (find the corresponding. vcproj file, add it)
- Compile one time first;
- Then select Qtwebkit as Startup Project, build again,
-
here will prompt WebCore compile failure, modify DefaultLocalizationStrategy.cpp error line, delete the full-width double quotation mark can be;
- Finally, select the browser item, build it again, and
-
This callback will not find the QtUIToolsd.lib link, add the corresponding vcproj (tools\designer\src\uitools\ Qtuitools.vcproj)
- Note that, in this configuration, some sub-project modules are still not compiled to the end, stating that it is not necessary for qtwebkit (e.g. the phonon)
- However, these project modules are still required (such as qtsql, Qtxml, etc.) when a later version of WebKit needs to be compiled on qt-4.8.x
- Compile again, this time it's done.
4 Commissioning Qtwebkit
Set Qtwebkit as the Startup Project, debug command behavior demos/browser the full path of the program, and the boot path is set to Qt bin.
Compiling qt-4.8.x Debug version on Windows platform considerations