qt 4.8.5 vs 2012编译

  1. Download Qt 4.8.3 source code from http://qt-project.org/downloads

  2. Go to mkspecs\win32-msvc2010. Open qmake.conf and change:

    QMAKE_COMPILER_DEFINES += _MSC_VER=1600 WIN32

    to:

    QMAKE_COMPILER_DEFINES += _MSC_VER=1700 WIN32
  3. Replace qt-everywhere-opensource-src-4.8.3-x64\src\3rdparty\webkit\Source\JavaScriptCore\wtf\HashSet.h by this HashSet.h.

  4. Start "VS2012 x64 or X86 Native Tools Command Prompt"

  5. Switch to Qt 4.8.3 source directory (the directory that contains configure.exe) Configure -mp -opensource -nomake demos -nomake examples -platform win32-msvc2012

  6. nmake
  7.   platform\DefaultLocalizationStrategy.cpp(327) : error C2001: newline in constant
         platform\DefaultLocalizationStrategy.cpp(327) : fatal error C1057: unexpected end of file in macro expansion    
  8. go to line 327 change "return WEB_UI_STRING("Look Up “<ion>”", "Look Up context menu item with ed word").replace("<ion>", dStringForLookupMenuItem(edString));"  to "return WEB_UI_STRING("Look Up \"<selection>\"", "Look Up context menu item with selected word").replace("<selection>", truncatedStringForLookupMenuItem(selectedString));"
  9. nmake

你可能感兴趣的:(2012)