[Qt-interest] Building QT SDK on windows using Mingw

Anil H dspinside at gmail.com
Mon Aug 17 08:39:13 CEST 2009


On Tue, Aug 11, 2009 at 3:36 PM, Francisco Ares <frares at gmail.com> wrote:

> Hi
>
>
> On Tue, Aug 11, 2009 at 6:28 AM, Anil H <dspinside at gmail.com> wrote:
>
>> Hi,
>>
>> I want to build QT SDK on windows using Mingw provided with package .
>> I downloaded QT4.5.2 windows SDK.
>> For configuring QT I used the follwing command
>> configure  -debug -static -platform win32-g++
>>
>> After configuring I used the command
>> mingw32-make.exe to create the QT binaries
>>
>> During the make process I am getting error
>>
>> 'g++: OBJECTS_DIR: No such file or directory'
>>
>> I saw in the makefile generated that the line "OBJECTS_DIR =
>> tmp/obj/debug_static"
>> is included next to the list of library and "OBJECTS_DIR" is treated
>> as a library
>>
>> ' -lwinspool -lmsimg32 -lQtCored -lkernel32 -luser32 -lshell32 -luuid
>> -lole32
>>  -ladvapi32 -lws2_32 OBJECTS_DIR = tmp/obj/debug_static '
>>
>> Any ideas on what has to be done to avoid this OBJECTS_DIR in the makefile
>> ?.
>> Any help is appreciated.
>>
>> Thanks and regards
>> Anil
>>
>
>
> The instructions bellow were intended to be a batch file, but I'd rather
> use the instructions individually to take more control on what's going on.
>
> rem      DEPENDENCIES:
> rem      - installl VisualStudio 8
> rem          install in default folders, OR ...
> rem      - install Microsoft Platform SDK (optional, I guess)
> rem          install in "C:\MSPlatformSDK\" ;
> rem      - install OpenGL:
> rem          read "README-win32.txt" and,
> rem          edit file .\lib\glut\glut32.dsp replacing "\VC98\" with "\VC\"
> ;
> rem      - install DirectX SDK
> rem          install in "C:\DirectX\" ;
> rem      - install NMAKE.exe
> rem          copy the files to folder "C:\Windows\" ;
> rem
> rem      OPCIONALS
> rem      - install OpenSSL:
> rem          install in "C:\openssl" and check its dependencies:
> rem          - install NASM:
> rem              copy NASM.EXE to folder "C:\Windows\" ;
> rem          - install Perl:
> rem              just for the build process, can be removed afterwards ;
> rem              don't forget to add the Perl executable directory to the
> PATH environment variable ;
> rem
> rem      now you may copy/paste the instruction lines bellow to a "cmd"
> console:
>
> C:
> "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" rem OR
> "C:\Arquivos de programas\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" if
> you use a brazilian portuguese OS, like me
> rem "C:\MSPlatformSDK\SetEnv.Cmd" /XP32 /RETAIL        rem needed, at
> least, for "dshow.h" for the phonon backend
> "C:\DirectX\Utilities\bin\dx_setenv.cmd"
> rem set QT_PATH=C:\Qt\4.5.2
> set INCLUDE=%INCLUDE%;C:\openssl\include
> set LIB=%LIB%;C:\openssl\lib;
> set PATH=%QT_PATH%\bin;%PATH%
> cd %QT_PATH%
> rem configure -opensource -exceptions -qmake -mmx -sse -sse2 -stl
> -debug-and-release -shared -no-fast -qt-sql-sqlite -no-qt3support -platform
> win32-msvc2005 -qt-zlib -qt-libpng -qt-gif -qt-libmng -qt-libjpeg
> -qt-libtiff -graphicssystem raster -dsp -vcproj -direct3d -arch windows
> -webkit -qt-crt -scripttools -no-phonon -no-phonon-backend -qt-style-windows
> -qt-style-windowsxp -qt-style-windowsvista -qt-style-plastique
> -qt-style-cleanlooks
> configure -opensource -exceptions -qmake -stl -debug-and-release -shared
> -no-fast -qt-sql-sqlite -no-qt3support -platform win32-msvc2005 -qt-zlib
> -qt-libpng -qt-gif -qt-libmng -qt-libjpeg -qt-libtiff -graphicssystem raster
> -direct3d -arch windows -webkit -qt-crt -scripttools -no-phonon
> -no-phonon-backend -qt-style-windows -qt-style-windowsxp -qt-style-plastique
> y
> nmake
> rem      now wait for several hours
>
> rem      the following will remove temporary build files
> nmake clean
>
> rem      this will clean configuration cache (or database, or whatever)
> rem nmake confclean
>
> rem     this will do a complete clean, including built files (I prefer to
> remove the entire folder and get it back from the tarball again :-P )
> rem nmake distclean
>
>
> rem        ... OR, in a MSYS shell ...
> rem        export QT_PATH=/c/Qt/4.5.2
> rem        export PATH=$PATH%:$QT_PATH/bin
> rem        cd $QT_PATH
> rem        ./configure -debug-and-release -shared -qt-sql-sqlite
> -no-qt3support -platform win32-g++      -qt-zlib -qt-libpng -qt-gif
> -qt-libmng -qt-libjpeg -qt-libtiff -graphicssystem opengl -graphicssystem
> raster -no-dsp -no-vcproj           -arch windows -webkit -qt-crt
> rem        mingw32-make
> rem        rem        now wait for several hours
>
>
> Hope this helps
>
> --
> "If you have an apple and I have an apple and we exchange apples then you
> and I will still each have one apple. But if you have an idea and I have one
> idea and we exchange these ideas, then each of us will have two ideas." -
> George Bernard Shaw
>

Hi Francisco Ares,

Thanks for your ideas.
I tried buidlding QT on windows using the batch script you mentioned for
MinGW . I have added OpenSSL header files and libraries to the command line
in the configure process.

configure.exe -debug -qt-sql-sqlite -no-qt3support -platform win32-g++
-qt-zlib -qt-libpng -qt-gif -qt-libmng -qt-libjpeg -qt-libtiff
-graphicssystem opengl -graphicssystem raster -no-dsp -no-vcproj -arch
windows -webkit -qt-crt -openssl -I
E:\qt\openssl-0.9.8k\openssl-0.9.8k\outinc\ -L
E:\qt\openssl-0.9.8k\openssl-0.9.8k\out\

 It has been building from 3-4 days on my PC (core 2duo 2.33Ghz*2 ,2gb ram).
The build system has stopped(it hasn't crashed but not building further)
while building /src/3rdparty/zlib/crc32. So I manually stopped the build and
ran mingw32-make.exe again in the command line. Now it built
src/3rdparty/zlib/crc32 successfully. But crashed while building rcc.exe
The logs are provided below. The strange stuff here is ,it is treating
OBJECTS_DIR = tmp/obj/debug_shared as a library.

g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE
-DQT_LARGEFILE_SUPPORT -
DQT_RCC -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_TEXTCODEC
-DQT_NO_CAST_FROM_ASC
II -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM
-DQT_NO_GEOM_VARIANT
-DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE
-DQT_NO_TEXTSTR
EAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NODLL
-I"e
:\qt\openssl-0.9.8k\openssl-0.9.8k\outinc" -I"sql-drivers" -I"+=" -I"sqlite"
-I"
." -I"." -I"..\..\..\include" -I"..\..\..\include\QtCore"
-I"..\..\..\include\Qt
Xml" -I"..\..\xml" -I"..\..\..\mkspecs\win32-g++" -o debug\main.o main.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import
-Wl,-enable-runtime-pseudo-rel
oc -Wl,-subsystem,console -mthreads -Wl -o ..\..\..\bin\rcc.exe debug/rcc.o
debu
g/main.o  -LE:\qt\openssl-0.9.8k\openssl-0.9.8k\out OBJECTS_DIR =
tmp/obj/debug_
shared -L../bootstrap/debug -lbootstrap -luser32
g++: OBJECTS_DIR: No such file or directory
g++: =: No such file or directory
g++: tmp/obj/debug_shared: No such file or directory
mingw32-make[2]: *** [..\..\..\bin\rcc.exe] Error 1
mingw32-make[2]: Leaving directory `C:/Qt/2009.03/qt/src/tools/rcc'
mingw32-make[1]: *** [debug] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/2009.03/qt/src/tools/rcc'
mingw32-make: *** [sub-rcc-make_default-ordered] Error 2

Any help is appreciated.

Thanks and regards
Anil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090817/9a42e3de/attachment.html 


More information about the Qt-interest-old mailing list