Results 1 to 3 of 3

Thread: [TUTORIAL] how to compile qt, qtcreator and libqxt on Windows-Mingw (with openssl)

  1. #1
    Join Date
    Jul 2009
    Posts
    74
    Thanks
    2
    Thanked 6 Times in 6 Posts

    Default [TUTORIAL] how to compile qt, qtcreator and libqxt on Windows-Mingw (with openssl)

    Hi !
    first off... sorry for my poor english...

    I had spent many hours trying to get libqxt widgets on qt creator (on Windows Mingw).
    As you know for archieve that you usually only need to compile qt creator with mingw... but... the last qt 4.7.1 package has a bug... http://bugreports.qt.nokia.com/browse/QTBUG-15744 ... and can not be used to build Qt Creator.

    there are a lot of tutorials to build qt and qt creator on windows-mingw... but some of them are incomplete or erronous...
    so... i want to help others to avoid my frustration....

    follow these steps carefully

    1)
    you need this specific version of mingw
    http://get.qt.nokia.com/misc/MinGW-gcc440_1.zip
    just unzip it ... (c:\mingw)

    2)
    we are going to activate openssl on qt... so... you need openssl. (maybe you prefer to skip this step)
    http://www.slproweb.com/products/Win32OpenSSL.html
    http://www.slproweb.com/download/Win...SSL-1_0_0c.exe
    just only need to install the binary pack
    (in this example on c:\OpenSSL-Win32)

    3)
    download qt source
    http://qt.nokia.com/downloads
    http://get.qt.nokia.com/qt/source/qt...-src-4.7.1.zip

    unzip it
    (in this example qt root is on C:\Qt\qt-everywhere-opensource-src-4.7.1\)

    4)
    open a console as Administrator

    set PATH=C:\MinGW\bin;%SystemRoot%\System32

    configure qt with openssl:

    configure -platform win32-g++ -debug-and-release -opensource -developer-build -shared -qt-sql-sqlite -plugin-sql-sqlite -qt-sql-odbc -plugin-sql-odbc -no-qt3support -no-opengl -no-phonon -no-phonon-backend -nomake examples -nomake demos -webkit -script -declarative -qt-libtiff -openssl -I C:\OpenSSL-Win32\include -L c:\OpenSSL-Win32\lib\MinGW

    (maybe you want to remove openssl ... or you want other options... just write "configure -?" to see a detailed explanation of what options ara avaliable)

    then:
    mingw32-make
    (this takes more than 4 hours in a modern computer... patience)

    close that console

    5)
    now download qt creator sources
    http://qt.nokia.com/downloads/qt-creator-source-package
    unzip it
    (in this example on C:\qt-creator-2.0.1-src)

    open a new console as administator (IMPORTANT!)

    set QTDIR=C:\Qt\qt-everywhere-opensource-src-4.7.1
    set PATH=C:\Qt\qt-everywhere-opensource-src-4.7.1\bin;C:\Qt\qt-everywhere-opensource-src-4.7.1\lib;C:\MinGW\bin;%SystemRoot%\System32
    set QMAKESPEC=win32-g++

    create a new folder
    (in this example C:\qt-creator-2.0.1-build)
    go to C:\qt-creator-2.0.1-build

    qmake.exe C:\qt-creator-2.0.1-src\qtcreator.pro -spec win32-g++ -r CONFIG+=release

    mingw32-make release

    (this take more than an hour to complete)

    close that console

    6)

    add this to PATH system enviroment variable
    C:\Qt\qt-everywhere-opensource-src-4.7.1\bin;C:\Qt\qt-everywhere-opensource-src-4.7.1\lib;C:\MinGW\bin;

    now you can launch C:\qt-creator-2.0.1-build\bin\qtcreator.exe and it should work fine.

    CLOSE qtcreator

    7)

    download libqxt
    http://dev.libqxt.org/libqxt/downloads
    and unzip it
    (in this example on c:\libqxt)

    open a console as administrator

    set QTDIR=C:\Qt\qt-everywhere-opensource-src-4.7.1
    set PATH=C:\Qt\qt-everywhere-opensource-src-4.7.1\bin;C:\Qt\qt-everywhere-opensource-src-4.7.1\lib;C:\MinGW\bin;%SystemRoot%\System32
    set QMAKESPEC=win32-g++

    go to c:\libqxt

    configure -debug_and_release -no-db -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib -l libeay32 -l ssleay32

    mingw32-make

    mingw32-make install

    now you can open qtcreator or qtdesigner... and you can see libqxt plugins !


    I hope this help.
    I'm not an expert... so.. if you want to improve this guide...

    Last edited by javimoya; 19th December 2010 at 18:26.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: [TUTORIAL] how to compile qt, qtcreator and libqxt on Windows-Mingw (with openssl

    why not post it in the wiki?
    here it gets lost between so many threads...
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3

    Default Re: [TUTORIAL] how to compile qt, qtcreator and libqxt on Windows-Mingw (with openssl

    I tried following your tutorial and I`m getting an error on the fourth step.
    I used the following command line:
    configure -platform win32-g++ -debug-and-release -opensource -developer-build -shared -qt-sql-sqlite -qt-sql-sqlite -plugin-sql-psql -qt-sql-odbc -plugin-sql-odbc -no-qt3support -no-opengl -no-phonon -no-phonon-backend -nomake examples -nomake demos -webkit -script -declarative -qt-libtiff -openssl -I C:\OpenSSL-Win32\include -L c:\OpenSSL-Win32\lib\MinGW

    and I`m getting the following error:
    ...
    Creating qmake...
    g++ -c -oproject.o -O -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Ige
    nerators/mac -Igenerators/symbian -IC:\Qt\qt-everywhere-opensource-src-4.7.2/inc
    lude -IC:\Qt\qt-everywhere-opensource-src-4.7.2/include/QtCore -IC:\Qt\qt-everyw
    here-opensource-src-4.7.2/include -IC:\Qt\qt-everywhere-opensource-src-4.7.2/inc
    lude/QtCore -IC:\Qt\qt-everywhere-opensource-src-4.7.2/src/corelib/global -IC:\Q
    t\qt-everywhere-opensource-src-4.7.2/src/corelib/xml -IC:\Qt\qt-everywhere-opens
    ource-src-4.7.2/mkspecs/win32-g++ -IC:\Qt\qt-everywhere-opensource-src-4.7.2/too
    ls/shared -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PC
    RE -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUI
    LD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM
    -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQMAKE_OPENSOURCE_EDITION project.cpp

    g++: CreateProcess: No such file or directory
    mingw32-make: *** [project.o] Error 1
    del project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o option.o win
    makefile.o projectgenerator.o property.o meta.o makefiledeps.o metamakefile.o xm
    loutput.o pbuilder_pbx.o borland_bmake.o msvc_nmake.o msvc_vcproj.o msvc_vcxproj
    .o msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.
    o symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o qbitarray
    .o qbuffer.o qbytearray.o qcryptographichash.o qvsnprintf.o qbytearraymatcher.o
    qconfig.o qdatetime.o qdir.o qdiriterator.o qfile.o qtemporaryfile.o qfileinfo.o
    qabstractfileengine.o qfsfileengine.o qfsfileengine_iterator.o qfsfileengine_wi
    n.o qfsfileengine_iterator_win.o qglobal.o qhash.o qiodevice.o qlibraryinfo.o ql
    ist.o qlinkedlist.o qlocale.o qmalloc.o qmap.o qregexp.o qtextcodec.o qutfcodec.
    o qstring.o qstringlist.o qsystemlibrary.o qtextstream.o quuid.o qvector.o qurl.
    o qsettings.o qsettings_win.o qvariant.o qmetatype.o qxmlstream.o qxmlutils.o qn
    umeric.o
    process_begin: CreateProcess(NULL, del project.o main.o makefile.o unixmake.o un
    ixmake2.o mingw_make.o option.o winmakefile.o projectgenerator.o property.o meta
    .o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc
    _nmake.o msvc_vcproj.o msvc_vcxproj.o msvc_objectmodel.o msbuild_objectmodel.o s
    ymmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o symbiancommo
    n.o registry.o epocroot.o qbitarray.o qbuffer.o qbytearray.o qcryptographichash.
    o qvsnprintf.o qbytearraymatcher.o qconfig.o qdatetime.o qdir.o qdiriterator.o q
    file.o qtemporaryfile.o qfileinfo.o qabstractfileengine.o qfsfileengine.o qfsfil
    eengine_iterator.o qfsfileengine_win.o qfsfileengine_iterator_win.o qglobal.o qh
    ash.o qiodevice.o qlibraryinfo.o qlist.o qlinkedlist.o qlocale.o qmalloc.o qmap.
    o qregexp.o qtextcodec.o qutfcodec.o qstring.o qstringlist.o qsystemlibrary.o qt
    extstream.o quuid.o qvector.o qurl.o qsettings.o qsettings_win.o qvariant.o qmet
    atype.o qxmlstream.o qxmlutils.o qnumeric.o, ...) failed.
    make (e=2): O sistema nao pode encontrar o arquivo especificado.
    mingw32-make: [clean] Error 2 (ignored)
    g++ -c -oproject.o -O -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Ige
    nerators/mac -Igenerators/symbian -IC:\Qt\qt-everywhere-opensource-src-4.7.2/inc
    lude -IC:\Qt\qt-everywhere-opensource-src-4.7.2/include/QtCore -IC:\Qt\qt-everyw
    here-opensource-src-4.7.2/include -IC:\Qt\qt-everywhere-opensource-src-4.7.2/inc
    lude/QtCore -IC:\Qt\qt-everywhere-opensource-src-4.7.2/src/corelib/global -IC:\Q
    t\qt-everywhere-opensource-src-4.7.2/src/corelib/xml -IC:\Qt\qt-everywhere-opens
    ource-src-4.7.2/mkspecs/win32-g++ -IC:\Qt\qt-everywhere-opensource-src-4.7.2/too
    ls/shared -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PC
    RE -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUI
    LD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM
    -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQMAKE_OPENSOURCE_EDITION project.cpp

    g++: CreateProcess: No such file or directory
    mingw32-make: *** [project.o] Error 1
    Building qmake failed, return code 2



    Can someone help this noob fellow(me) who all his life used windows binaries, never having to compile anything, and now that the compiling time has came, has no ideia wtf this error means.

Similar Threads

  1. Replies: 2
    Last Post: 19th January 2011, 19:02
  2. Compile Qtcreator with mingw ?
    By tonnot in forum Installation and Deployment
    Replies: 13
    Last Post: 3rd November 2010, 22:00
  3. Replies: 15
    Last Post: 24th October 2010, 15:29
  4. windows 7 + mingw + qt 4.x + qca 2.x + openssl 0.98
    By jm in forum Installation and Deployment
    Replies: 0
    Last Post: 1st June 2010, 08:50
  5. using GLUT along with qtcreator/mingw in windows
    By stephanepoirier in forum Qt Programming
    Replies: 1
    Last Post: 3rd March 2009, 05:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.