PDA

View Full Version : Qt 4.5.1 Compile error on Windows XP [SOLVED]



Teuniz
27th April 2009, 09:18
I solved the problem, I edited the mkspecs file wrong:
I added "static" instead of "-static".

Sorry for bothering.


Original message:

I downloaded the Qt framework 4.5.1 with MinGW and I installed it on Windows XP.

I edited <QTDIR>\mkspecs\win32-g++\qmake.conf:

I changed

QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc

to (add -static)

QMAKE_LFLAGS = -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc

I opened the Qt console and configured Qt as follows:

configure -static -release -no-qt3support -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg -qt-libtiff -no-exceptions -no-scripttools -no-dsp -no-vcproj -nomake demos -nomake examples -nomake tools -no-webkit -no-phonon -no-phonon-backend -no-xmlpatterns -no-dbus -no-opengl -no-scripttools

So far everything went well.

Then I used the make command.
After some time I get the following error:

g++ -c -O2 -frtti -fno-exceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_MOC
-DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_TEXTCODEC -DQT_NO_CAST_FROM_ASCII
-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_TEXTSTREAM
-D QT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NODLL -I"." -I"."
-I"..\..\..\include" -I"..\..\..\include\QtCore" -I"..\..\..\include\QtXml"
-I "..\..\xml" -I"." -I"..\..\..\mkspecs\win32-g++" -o release\main.o main.cpp
g++ static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
-Wl,-s -Wl,-subsystem,console -o ..\..\..\bin\moc.exe release/moc.o release/preprocessor.o
release/generator.o release/parser.o release/token.o release/main.o -L../bootstrap/release
-lbootstrap -luser32
g++: static: No such file or directory
mingw32-make[2]: *** [..\..\..\bin\moc.exe] Error 1
mingw32-make[2]: Leaving directory `C:/Qt/4.5.1/src/tools/moc'
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/4.5.1/src/tools/moc'
mingw32-make: *** [sub-moc-make_default-ordered] Error 2

With Qt 4.5.0 there are no errors (using the same commands and configure options).

Any ideas?