Here is how I compile the Qt Windows Opensource version.
As it uses mingw, which sets INCLUDE and LIB environment variables, and this causes compilation errors in some machines. So after talking to hte trolltech support team( and ya, they answers question from Opensource guys
). they have asked me to unset these varaibles. So I edited my qtvars.bat ( C:\Qt\4.3.1\bin\qtvars.bat ) file as follows
@echo off
rem
rem This file is generated
rem
echo Setting up a MinGW/Qt only environment...
echo -- QTDIR set to C:\Qt\4.3.1
echo -- PATH set to C:\Qt\4.3.1\bin
echo -- Adding C:\MinGW\bin to PATH
echo -- Adding %SystemRoot%\System32 to PATH
echo -- QMAKESPEC set to win32-g++
set LIB=
set INCLUDE=
set QTDIR=C:\Qt\4.3.1
set PATH=C:\Qt\4.3.1\bin
set PATH=%PATH%;C:\MinGW\bin
set PATH=%PATH%;%SystemRoot%\System32
set QMAKESPEC=win32-g++
if not "%1"=="compile_debug" goto END
cd %QTDIR%
echo This will configure and compile qt in debug.
echo The release libraries will not be recompiled.
pause
configure -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg
cd %QTDIR%\src
qmake
mingw32-make debug
:END
@echo off
rem
rem This file is generated
rem
echo Setting up a MinGW/Qt only environment...
echo -- QTDIR set to C:\Qt\4.3.1
echo -- PATH set to C:\Qt\4.3.1\bin
echo -- Adding C:\MinGW\bin to PATH
echo -- Adding %SystemRoot%\System32 to PATH
echo -- QMAKESPEC set to win32-g++
set LIB=
set INCLUDE=
set QTDIR=C:\Qt\4.3.1
set PATH=C:\Qt\4.3.1\bin
set PATH=%PATH%;C:\MinGW\bin
set PATH=%PATH%;%SystemRoot%\System32
set QMAKESPEC=win32-g++
if not "%1"=="compile_debug" goto END
cd %QTDIR%
echo This will configure and compile qt in debug.
echo The release libraries will not be recompiled.
pause
configure -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg
cd %QTDIR%\src
qmake
mingw32-make debug
:END
To copy to clipboard, switch view to plain text mode
Notice the set LIB= and INCLUDE= ( linenumber 13, 14 )
Works for me
Bookmarks