Difference between revisions of "Slicer3:Developers:Projects:QtSlicer/Tutorials/CompileWithQt"
From Slicer Wiki
Line 2: | Line 2: | ||
= Building Slicer with Qt = | = Building Slicer with Qt = | ||
− | * Download and install Qt. As of winter 2009, get | + | * Download and install Qt. As of winter 2009, get the [http://qt.nokia.com/doc/4.6/qt4-6-intro.html 4.6 version]. |
** Windows - need to get source code and build with <code>configure.exe -platform msvc2008</code> run <code>vcvars32.bat</code> first and then <code>nmake</code>. | ** Windows - need to get source code and build with <code>configure.exe -platform msvc2008</code> run <code>vcvars32.bat</code> first and then <code>nmake</code>. | ||
*** building with webkit support requires that <i>src/3rdparty/webkit/WebCore/tmp/moc/{debug,release}_shared/mocinclude.tmp</i> be removed. else you will get linker errors like <code>QNetworkReplyHandler.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall WebCore::FormDataIODevice::metaObject(void)const (?metaObject@FormDataIODevice@WebCore@@UBEPBUQMetaObject@@XZ)</code> | *** building with webkit support requires that <i>src/3rdparty/webkit/WebCore/tmp/moc/{debug,release}_shared/mocinclude.tmp</i> be removed. else you will get linker errors like <code>QNetworkReplyHandler.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall WebCore::FormDataIODevice::metaObject(void)const (?metaObject@FormDataIODevice@WebCore@@UBEPBUQMetaObject@@XZ)</code> | ||
Line 42: | Line 42: | ||
make -j16 | make -j16 | ||
</pre> | </pre> | ||
+ | |||
+ | = Useful links for Qt = | ||
+ | * [http://qt.nokia.com/doc/4.6/index.html 4.6 Documentation] | ||
+ | * [http://qt.nokia.com/doc/4.6/how-to-learn-qt.html First steps] | ||
+ | * [http://qt.nokia.com/doc/4.6/tutorials.html Tutorials] | ||
+ | * [http://qt.nokia.com/doc/4.6/examples.html Examples] |
Revision as of 17:18, 13 December 2009
Home < Slicer3:Developers:Projects:QtSlicer < Tutorials < CompileWithQtBuilding Slicer with Qt
- Download and install Qt. As of winter 2009, get the 4.6 version.
- Windows - need to get source code and build with
configure.exe -platform msvc2008
runvcvars32.bat
first and thennmake
.- building with webkit support requires that src/3rdparty/webkit/WebCore/tmp/moc/{debug,release}_shared/mocinclude.tmp be removed. else you will get linker errors like
QNetworkReplyHandler.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall WebCore::FormDataIODevice::metaObject(void)const (?metaObject@FormDataIODevice@WebCore@@UBEPBUQMetaObject@@XZ)
- building with webkit support requires that src/3rdparty/webkit/WebCore/tmp/moc/{debug,release}_shared/mocinclude.tmp be removed. else you will get linker errors like
- Linux/Mac - install full QtCreator package (snowleopard not yet supported in 4.5.2)
- Windows - need to get source code and build with
cd Slicer3-lib mkdir Qt mkdir Qt-build cd Qt wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.0.tar.gz tar xvfz qt-everywhere-opensource-src-4.6.0-beta1.tar.gz cd qt-everywhere-opensource-src-4.6.0-beta1 echo yes | ./configure -prefix ../../Qt-build -debug-and-release -opensource -no-qt3support make -j 16 make install
- Build VTK with Qt enabled
cd ../../VTK-build ../CMake-build/bin/ccmake . Press 't' to enter advanced mode. VTK_USE_GUISUPPORT to ON Press 'c' to configure. VTK_USE_QVTK to ON DESIRED_QT_VERSION to 4 Press 'c' to configure. QT_QMAKE_EXECUTABLE to {path to}/Slicer3-lib/Qt-build/bin/qmake Press 'g' to generate make -j16
- Build Slicer with Qt enabled.
cd ../../Slicer3-build ../Slicer3-lib/CMake-build/bin/ccmake . Slicer3_USE_QT ON Press 'c' to configure QT_QMAKE_EXECUTABLE to {path to}/Slicer3-lib/Qt-build/bin/qmake Press 'c' to configure and then press 'g' to generate. make -j16