Difference between revisions of "Documentation/Labs/Qt484"

From Slicer Wiki
Jump to: navigation, search
 
Line 1: Line 1:
* To compile Qt with VS 2012 (VS 11) for 64 bit (not quite tested yet..):
+
* To compile Qt with VS 2012 (VS 11) for 64 bit:
 +
 
 +
** 4.8.4 does not compile under VS 2012 but it compiles with a patch (see below).
 +
 
 +
** Note that if you compile something greater than 4.8.4, you'd need to change <code>set(Slicer_EXPERIMENTAL_QT_VERSION "4.8.4")</code> in Slicer's CMakeLists.txt.
  
 
** Install perl (I used [http://www.activestate.com/activeperl/downloads] and choose 64 bit version)
 
** Install perl (I used [http://www.activestate.com/activeperl/downloads] and choose 64 bit version)
Line 5: Line 9:
 
** Build/install in say <code>C:\QtHacked</code>.
 
** Build/install in say <code>C:\QtHacked</code>.
 
   
 
   
** Cd into this directory and git clone git://gitorious.org/qt/qt (this gives a version, not sure which, in this case as per 6/19/2013, mkspecs/qconfig.pri provides version info: QT_VERSION = 4.8.5, a prelease?). Alternatively, better?, find zipped file of official release  [http://qt-project.org/downloads].
+
** Cd into this directory and git clone git://gitorious.org/qt/qt (this gives a pre-release version, in this case as per 6/19/2013, <code>mkspecs/qconfig.pri</code> provides version info: QT_VERSION = 4.8.5). Alternatively, find zipped file of official release  [http://qt-project.org/downloads]. As per 6/20/2013 you need to address the next item, whatever the version you have.
  
** This is bug [https://bugreports.qt-project.org/browse/QTBUG-31882 Qt 4.8.5 doesn't compile with VC 11, marked P2:important]: you must replace HashSet.h in src\3rdparty\webkit\Source\JavaScriptCore\wtf with [https://bitbucket.org/Vertexwahn/bluego/src/56dbe84212222ec6954d8d327a5e443106bcc447/deploy/BlueGo0.0.4/qt4.8.3vs2012patch/HashSet.h?at=default HashSet.h].
+
** There is bug that must be addressed: [https://bugreports.qt-project.org/browse/QTBUG-31882 Qt 4.8.5 doesn't compile with VC 11, marked P2:important]. To circumvent, replace HashSet.h in src\3rdparty\webkit\Source\JavaScriptCore\wtf with [https://bitbucket.org/Vertexwahn/bluego/src/56dbe84212222ec6954d8d327a5e443106bcc447/deploy/BlueGo0.0.4/qt4.8.3vs2012patch/HashSet.h?at=default HashSet.h].
  
 
** Use VS command prompt "x64 Cross Tools".
 
** Use VS command prompt "x64 Cross Tools".
Line 21: Line 25:
 
configure -release -mp -opensource -platform win32-msvc2012
 
configure -release -mp -opensource -platform win32-msvc2012
 
</pre>
 
</pre>
Then go brew a pot of coffee. If something fails at this point, you probably didn't install "Update 2" for VS 2012.
+
Then go brew a pot of coffee and come back. If something fails at this point, you probably didn't install "Update 2" for VS 2012. Then,
 
<pre>
 
<pre>
 
nmake
 
nmake
 
</pre>
 
</pre>
 +
Now you have a few hours for yourself. When the build is done, you can test it by say running "C:\QtHacked\qt\bin\qtdemo.exe".

Latest revision as of 12:05, 21 June 2013

Home < Documentation < Labs < Qt484
  • To compile Qt with VS 2012 (VS 11) for 64 bit:
    • 4.8.4 does not compile under VS 2012 but it compiles with a patch (see below).
    • Note that if you compile something greater than 4.8.4, you'd need to change set(Slicer_EXPERIMENTAL_QT_VERSION "4.8.4") in Slicer's CMakeLists.txt.
    • Install perl (I used [1] and choose 64 bit version)
    • Build/install in say C:\QtHacked.
    • Cd into this directory and git clone git://gitorious.org/qt/qt (this gives a pre-release version, in this case as per 6/19/2013, mkspecs/qconfig.pri provides version info: QT_VERSION = 4.8.5). Alternatively, find zipped file of official release [2]. As per 6/20/2013 you need to address the next item, whatever the version you have.
    • Use VS command prompt "x64 Cross Tools".
    • Then paste the following (-mp for multiprocessor use during build). (Adjust perl path as necessary.)

set QTDIR=C:\QtHacked\Qt
set PATH=%QTDIR%\bin;%PATH%
set QMAKESPEC=win32-msvc2012
cd /D %QTDIR%\
set PATH=C:\Perl64\bin;%PATH%
configure -release -mp -opensource -platform win32-msvc2012

Then go brew a pot of coffee and come back. If something fails at this point, you probably didn't install "Update 2" for VS 2012. Then,

nmake

Now you have a few hours for yourself. When the build is done, you can test it by say running "C:\QtHacked\qt\bin\qtdemo.exe".