Compiling qt-4.8.x Debug version on Windows platform considerations

Source: Internet
Author: User

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
  1. Enter cmd, enter command line environment
  2. 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)
  3. 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
  4. 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.
  5. Open Projects.sln with VS2008, the default startup project is bootstrap. Join Demos/browser, Qtuitools 2 items (find the corresponding. vcproj file, add it)
  6. Compile one time first;
  7. 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;
  8. 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)
  9. 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)
    1. 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
  10. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.