msvc 8 compile instructions

Peter Kümmel syntheticpp at gmx.net
Thu Jan 13 12:08:20 CET 2005


Here are compile instructions for msvc8.
(I don't know the english version of DE:Arbeitsplatz/Eigenschaften/Umgebungsvariablen):


This page gives you some instructions how to compile the Qt3/Win Free port with the free as beer
"Microsoft Visual C++ 2005 Express Edition Beta"
(Why using SUCH a compiler? It's the only free available IDE with a
almost template-standard conform compiler on windows - or is this wrong?)


Requirements
     * Windows 2000 or XP
     * Microsoft Visual C++ 2005 Express Edition Beta
     * Platform SDK
     * Qt-3/Win Free sources

Installing "Microsoft Visual C++ 2005 Express Edition Beta":

Download and install MSVC8 Beta ("vcsetup.exe", 66MB) and .NET 2.0 beta ("dotnetfx.exe", 24MB) after registration
from http://lab.msdn.microsoft.com/express/visualc/default.aspx.
Optionally you could download some unfinished Microsoft documentation with the file "msdnixp.exe" (166MB).


Installing the Platform SDK:

Download all files (320 MB) from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm.
Extract the files as described and run "Setup.exe": Install the "Core SDK".

Get the "Qt3/Win Free" sources

     * by downloading a Qt-3 source snapshot from the KDE-Cygwin snapshot area
     http://webdev.cegit.de/snapshots/kde-cygwin/qt/

     * or from the cvs repository

             first connect to the cvs server

             c:\source> cvs -d :pserver:anonymous at cvs.sourceforge.net:/cvsroot/kde-cygwin login

             enter empty password
             then checkout the sources with

             c:\source> cvs -z3 -d :pserver:anonymous at cvs.sourceforge.net:/cvsroot/kde-cygwin co -r QT_WIN32_3_3_BRANCH qt-3

Compiling Qt by command line tools

    1. Open a cmd shell
    2. Setup your compiler environment (please adjust the path to your needs)

     c:\source> "C:\Programme\Microsoft Visual Studio 8\Common7\Tools\vcvars32.bat"

    3. Setup Qt environment

     c:\source> set QTDIR=< qt3 source root>
     c:\source> set PATH=%QTDIR%\bin;%PATH%
     c:\source> set QMAKESPEC=win32-msvc.net

    4. Configure and build the source
       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 unnder Unix/Linux.
       After that, qmake.exe is build and the compilation gets started.

         c:\source> cd < qt3 source root >
         c:\source\qt-3> configure.bat [-fast] [-verbose]

       configure knows some of the parameters of the x11 release configure script like -fast or -verbose.
       For a full list see bin\configure.exe -help.

       This should build the whole Qt release. If it breaks you can restart compiling with

         c:\source\qt-3> nmake [< target >]

       for a list of all available targets see the toplevel Makefile

    5. Start Qt applications

     c:\source\qt-3> designer
     c:\source\qt-3> assistant
     c:\source\qt-3> linguist
     c:\source\qt-3> cd tutorial\t1
     c:\source\qt-3\tutorial\t1> t1


Compiling Qt with the IDE

    1. Setup Qt environment in EN:? DE:Arbeitsplatz/Eigenschaften/Umgebungsvariablen

         QTDIR=< qt3 source root>
         QMAKESPEC=win32-msvc.net
         add < qt3 source root>\bin to the PATH variable

      2. Add the Platform SDK Path (e.g. C:\Programme\Microsoft SDK\Include) at the end of the list to your Options:
         menu->Tools/Options: Projects and Solutions/VC++ Directories/Incude Files
         Also the /Library Files (e.g. C:\Programme\Microsoft SDK\Lib)

     3. run the configure.bat until it starts building qt and stop it there

     4. open and comile the /src/qt_mt.vcproj and qtmain.vcproj with the IDE

     5. compile other *.vcproj files



Notes:

     * Do not use spaces in the qt source path, it will produce weired results
     * incremental link does not work; use static linkage for a faster link process




More information about the kde-cygwin mailing list