Q... Windows Edition
Compile Instructions:
Packages:

Dev-C++ 5 compiling instructions

Requirements

  • Windows NT, 2000 or XP (it has not been tested on Windows 9.x)
  • MinGW
  • Dev-C++ 5
  • A svn client for svn checkouts (for example Subversion or TortoiseSVN)

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

  • The latest full MinGW Package from http://www.mingw.org - currently this is MinGW-5.1.1
  • 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 Q... sources

  • by downloading a Qt 3 source snapshot from the qtwin download area
  • or from the svn repository (qtwin.svn.sourceforge.net)

    checkout the sources with

    c:\source>  svn co https://qtwin.svn.sourceforge.net/svnroot/qtwin/qt-3/trunk qt-3

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 Q... libraries

To get the Q... 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:Visual C++ 2005 Express EditionNext:KDiff3

Hosted by SourceForge