PDA

View Full Version : Building QT Staticly issue [The syntax of the command is incorrect.]



originof
31st July 2010, 10:25
Hi, I'm trying to build QT 4.6.3 staticly.
I've used

cofigure -static -qt-sql-sqlite -no-qt3support

and compiled with


mingw32-make

but after a while get an error


mingw32-make[2]: Entering directory `c:/Qt/4.6.3/src/corelib'
C:/Qt/4.6.3/bin/moc.exe -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_S
UPPORT -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_ASCII_CAST_WAR
NINGS -DQT_MOC_COMPAT -D_USE_MATH_DEFINES -DHB_EXPORT=Q_CORE_EXPORT -I
'../../include' -I'../../include/QtCore' -I'tmp/rcc/debug_static' -I't
mp' -I'global' -I'../3rdparty/zlib' -I'../3rdparty/harfbuzz/src' -I'..
/3rdparty/md5' -I'../3rdparty/md4' -I'../../include/ActiveQt' -I'tmp/m
oc/debug_static' -I'../../mkspecs/win32-g++' -D__GNUC__ -DWIN32 animat
ion/qabstractanimation.h -o tmp/moc/debug_static/moc_qabstractanimatio
n.cpp
The syntax of the command is incorrect.
mingw32-make[2]: *** [tmp/obj/debug_static/qt_pch.h.gch/c++] Error 1
mingw32-make[2]: Leaving directory `c:/Qt/4.6.3/src/corelib'
mingw32-make[1]: *** [debug-all] Error 2
mingw32-make[1]: Leaving directory `c:/Qt/4.6.3/src/corelib'
mingw32-make: *** [sub-corelib-make_default-ordered] Error 2

c:\Qt\4.6.3>

Anyone can help me?
I've tried also another QT version but still get the problem.

Sorry for my English.

knifesk
11th August 2010, 17:10
I don't know much about Qt, but as I'm trying to do the same as you I'm reading a lot... and somewhere I've read that 4.6.3 won't compile statically :(

but, if I'm wrong some one can correct me

Here is the source: http://bugreports.qt.nokia.com/browse/QTBUG-11501

http://www.qtcentre.org/threads/31684-Problems-creating-Qt-4.6.3-static-with-MinGw

GordonSchumacher
13th August 2010, 13:21
I've not worked with a MinGW build of Qt, but I can say that 4.6.3 definitely does build statically under MSVC. However, I'm 99% sure that this error message is unrelated; that message is coming from the Windows API, not the compiler!

For instance, one time I have seen that is if you are trying to run an executable from cmd.exe which is missing a DLL dependency; if you're running from the GUI, you get the dialog stating this.

Note that I'm not saying that this is the cause here, just that this is one case where I've seen it...