<h2>Dev-C++ 5 compiling instructions</h2>
<p>This page gives you some instructions how to compile Qt3/Win Free with Dev-C++.</p>
<h3>Requirements</h3>
<ul>
<li> Windows NT, 2000 or XP (it has not been tested on Windows 9.x)</li>
<li> MinGW
<li> Dev-C++ 5 </li>
<li> Qt-3/Win Free sources</li>
</ul>
<h3>Installing Dev-C++ already containing MinGW</h3>
<ul>
<li> Download Dev-C++ 5 with Mingw/GCC (7.6MB only!) from <a target="_blank" href="http://www.bloodshed.net/dev/devcpp.html">www.bloodshed.net/dev/devcpp.html</a>. </li>
<li> Install Dev-C++ 5, do not enable 'Class Browsing', if you are ask for</li>
<li> or disable 'Class Browsing' in the menu 'Tools/Editor Options'</li>
</ul>
<h3>Installing Dev-C++ and MinGW seperate</h3>
<ul>
<li>Download and install the latest full MinGW Package from <a href="http://www.mingw.org/download.shtml">http://www.mingw.org</a> - currently this is
        <a href="http://prdownloads.sourceforge.net/mingw/MinGW-3.2.0-rc-3.exe?download">MinGW-3.2.0-rc-3.exe</a>.<br>
If you don't want to download 50MB, you need at least the binaries of <b>gcc-core</b>, <b>gcc-g++</b>, <b>w32api</b>, <b>mingw-runtime</b>, <b>binutils</b>, <b>gdb</b>, <b>mingw32-make</b> (7 files, 19MB)</li>
<li> Download 'Dev-C++ 5 executable only' from <a target="_blank" href="http://www.bloodshed.net/dev/devcpp.html">www.bloodshed.net/dev/devcpp.html</a> (2.1 MB). </li>
<li> Install Dev-C++ 5, do not enable 'Class Browsing', if you are ask for</li>
<li> or disable 'Class Browsing' in the menu 'Tools/Editor Options'.</li>
<li> add your MinGW\bin path to Dev-C++ in 'Tools/Compiler Options/Directories' or add your MinGW\bin path to the PATH variable.
</ul>
<h3>Get the Qt3/Win Free sources</h3>
<ul>
<li>by downloading a Qt-3 source snapshot from the <a target="_blank" href="http://webdev.cegit.de/snapshots/kde-cygwin/qt/">KDE-Cygwin snapshot area</a> (13.8MB).</li>
<li> or from the cvs repository:
<p>first connect to the cvs server</p>
<pre class="shell">C:\source> cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/kde-cygwin login</pre>
enter empty password<br>
then checkout the sources with
<pre class="shell">C:\source> cvs -z6 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/kde-cygwin co -r QT_WIN32_3_3_BRANCH qt-3</pre>
Later you can update the sources by
<pre class="shell">C:\source\qt-3> cvs -z6 update</pre>
or if you only what to update the 'src' directory (up is short for update)
<pre class="shell">C:\source\qt-3\src> cvs -z6 up</pre>
</li>
</ul>
<h3>Generating essential tools and files</h3>
<ul>
<li>Open a cmd shell</li>
<li> 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)
<pre class="shell">
C:\source> set QTDIR=C:\source\qt-3
C:\source> set MINGW=C:\Programs\MinGW
C:\source> set PATH=%QTDIR%\bin;%MINGW%\bin;%PATH%
</li>
<li>Build essential tools by command line<br>
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.
<pre class="shell">
C:\source> cd C:\source\qt-3
C:\source\qt-3>configure-mingw.bat -debug
</pre>
<p>For a full list of options see bin\configure.exe -help.</p>
<li><p>Stop the compilation if it has finished building 'qt-3\bin\qmake.exe'</p> </li>
</li>
<li>Generating Dev-C++ importable files<br>
Build *.dsp files which could be imported by Dev-C++ with
<pre class="shell">
C:\source\qt-3> set QMAKESPEC=win32-msvc -debug
C:\source\qt-3> bin\configure.exe</pre>
and also generate Makefiles for the special Qt build process by calling again:
<pre class="shell">C:\source\qt-3>configure-mingw.bat -debug</pre>
<li> <p>Break if it has finished building moc and close the cmd shell. </p></li>
</li>
</ul>
<h3>Using Dev-C++</h3>
<p>For all Qt project use this procedure: </p>
<ul>
<li>Open Dev-C++ and import the *.dsp file by the menu function 'File/Import' (e.g. 'qt-3\examples\hello\hello.dsp')</li>
<li>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')</li>
</ul>
<h3>Compiling the Qt libraries</h3>
You must compile both *.dsp files in the 'qt-3\src' folder.
<h2>Dev-C++ 5 Notes</h2>
<ul>
<li> 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.</li>
<li> After closing Dev-C++, next time opening a project sometimes it can't find the Makefile any more, just select it once again.</li>
</ul>
</ul>