QT 3/Windows Free Edition
Compile Instructions:
Packages:

Dev-C++ 5 compiling instructions

This page gives you some instructions how to compile Qt3/Win Free with Dev-C++.

Requirements

  • Windows NT, 2000 or XP (it has not been tested on Windows 9.x)
  • MinGW
  • Dev-C++ 5
  • Qt-3/Win Free sources

Installing Dev-C++ already containing MinGW

  • Download Dev-C++ 5 with Mingw/GCC (9.1MB only!) from www.bloodshed.net/dev/devcpp.html.
  • Install Dev-C++ 5, do not enable 'Class Browsing', if you are ask for
  • or disable 'Class Browsing' in the menu 'Tools/Editor Options'

Installing Dev-C++ and MinGW separate

  • Download and install the latest full MinGW Package from http://www.mingw.org - currently this is MinGW-3.2.0-rc-3.exe.
    If you don't want to download 50MB, you need at least the binaries of gcc-core, gcc-g++, w32api, mingw-runtime, binutils, gdb, mingw32-make (7 files, 19MB)
  • Download 'Dev-C++ 5 executable only' from www.bloodshed.net/dev/devcpp.html (2.1 MB).
  • Install Dev-C++ 5, do not enable 'Class Browsing', if you are ask for
  • or disable 'Class Browsing' in the menu 'Tools/Editor Options'.
  • add your MinGW\bin path to Dev-C++ in 'Tools/Compiler Options/Directories' or add your MinGW\bin path to the PATH variable.

Get the Qt3/Win Free sources

  • by downloading a Qt-3 source snapshot from the KDE-Cygwin snapshot area (13.8MB).
  • or from the cvs repository:

    first connect to the cvs server

    C:\source> cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/kde-cygwin login
    enter empty password
    then checkout the sources with
    C:\source> cvs -z6 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/kde-cygwin co -r QT_WIN32_3_3_BRANCH qt-3
    Later you can update the sources by
    C:\source\qt-3> cvs -z6 update
    or if you only want to update the 'src' directory (up is short for update)
    C:\source\qt-3\src> cvs -z6 up

Generating essential tools and files

  • Open a cmd shell
  • Setup Qt and MinGW environment, e.g. Qt in 'C:\source\qt-3', and MinGW in 'C:\Programs\MinGW' or C:\Program\Dev-Cpp (please adjust the paths to your needs)
     C:\source> set QTDIR=C:\source\qt-3
     C:\source> set MINGW=C:\Programs\MinGW
     C:\source> set PATH=%QTDIR%\bin;%MINGW%\bin;%PATH%
     
  • Build essential tools by command line
    The script first creates link_includes.exe and configure.exe which are needed for bootstrap the build process. link_includes copies all relevant Qt-headers into the include-directory. configure.exe is the replacement for the ./configure-script under Unix/Linux. After that, qmake.exe and moc.exe is build.
    C:\source> cd C:\source\qt-3
    C:\source\qt-3> configure-mingw.bat -debug -static
    

    For a full list of options see bin\configure.exe -help.

  • Stop the compilation if it has finished building 'qt-3\bin\qmake.exe'

  • Generating Dev-C++ importable files
    Build *.dsp files which could be imported by Dev-C++ with
    C:\source\qt-3> set QMAKESPEC=win32-msvc 
    C:\source\qt-3> bin\configure.exe -debug -static
    and also generate Makefiles for the special Qt build process by calling again:
    C:\source\qt-3>configure-mingw.bat -debug -static
  • Break if it has finished building moc and close the cmd shell.

Using Dev-C++

When compiling Qt projects with Dev-C++ you must use the Makefiles generated by qmake. Dec-C++ is 'only' a front end to use this makefiles. All compiler/linker options provided by Dev-C++ are disabled by choosing the 'Custom Makefile'. But one advantage over using the command line only is the user interface of the debugger.
  • Add the QTDIR variable to your environment in 'My Computer/Properties/Advanced/Environment Variables'
  • Restart Dev-C++

For all Qt project use this procedure:

  • Open Dev-C++ and import the *.dsp file by the menu function 'File/Import' (e.g. 'qt-3\examples\hello\hello.dsp')
  • Enable 'Use custom Makefile' in 'Project/Project Options/Makefile' and choose 'Makefile' in the folder of your project (e.g. 'qt-3\examples\hello\Makefile').

Compiling the Qt libraries

To get the Qt-library only, you must build the qt and main library.
  • Compiling with Dev-C++ import both *.dsp files in the 'qt-3\src' folder (don't forget to select Makefile or Makefile.main).
  • If you have time (one hour and more) you can also build everyting (uic, designer, assistant, examples, tutorials ...) by using the command line:
    C:\source> cd C:\source\qt-3
    C:\source\qt-3> configure-mingw.bat -debug -static
    

Dev-C++ 5 Notes

  • MinGW does not work within a cygwin shell or with sh.exe in your search path. You must remove cygwin\bin from your PATH or temporary rename your cygwin folder.
  • After closing Dev-C++, next time opening a project Dec-C++ can't find the Makefile any more, just select it once again.
  • Use static linkage for much faster link processes.
 
Prev:MS Visual C++ 2005 Express Edition BetaNext:KDiff3

Hosted by SourceForge GOWEBCounter by INLINE visitors