PDA

View Full Version : compiling Qt 4.6 in msys



manekineko
11th March 2010, 22:12
I have previously recompiled Qt 4.5 in msys on Windows without any difficulties. However, following what I believe are the same procedures on Qt 4.6, I'm getting the following problem when I run configure -opensource -platform win32-g++


Creating qmake. Please wait...
rm: cannot remove directory `mkspecs/default': Is a directory
ln: creating symbolic link `mkspecs/default/win32-g++' to `win32-g++': No such f
ile or directory
g++ -c -o project.o -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/un
ix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/c/qt/2010.02.1/qt
/include -I/c/qt/2010.02.1/qt/include/QtCore -I/c/qt/2010.02.1/qt/src/corelib/gl
obal -I/c/qt/2010.02.1/qt/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOO
TSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL
-DQT_NO_COMPRESS -I/c/qt/2010.02.1/qt/mkspecs/win32-g++ -DHAVE_QCONFIG_CPP -DQT_
NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT project.cpp
project.cpp: In member function 'QStringList& QMakeProject::values(const QString
&, QMap<QString, QStringList>&)':
project.cpp:3101: error: cannot convert 'wchar_t*' to 'CHAR*' for argument '1' t
o 'BOOL GetComputerNameA(CHAR*, DWORD*)'
make.exe: *** [project.o] Error 1

I'm sure I've made some type of a stupid mistake, but why is it looking in mkspecs/default/win32-g++ instead of mkspecs/win32-g++?

Also, are there no longer style configuration options for configure such as -no-style-motif?

manekineko
11th March 2010, 22:23
Just tried making a copy of mkspecs/win32-g++ in the qt directory, and then eliminates the symbolic link complaint, but the rest remain. Removed the directory mkspecs/default, and that eliminates that complaint, but the error still occurs. So it looks like the conversion error is an unrelated error to the two warnings.

maqifrnswa
23rd July 2010, 22:39
I had the same problem.

solution:

instead of "configure -platform win32-g++"

do: "configure.exe -platform win32-g++" and other options

manekineko
24th July 2010, 20:25
Thanks, that got me farther in the process. Now my build of QT is dying with this, anyone ever seen anything like this or have any advice on how I can start trying to fix this? I'm really scratching my head at this error and don't know how I would begin to solve it.

c:/mingw/bin/mingw32-make -f Makefile.Debug all
mingw32-make[5]: Entering directory `c:/qt/2010.04/qt/tools/assistant/tools/assi
stant'
g++ -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-ps
eudo-reloc -Wl,-subsystem,windows -o ../../../../bin/assistant.exe object_script
.assistant.Debug -L'c:/qt/2010.04/qt/lib' -L'c:/qt/2010.04/qt/lib' -lmingw32 -l
qtmaind tmp/obj/debug_static/assistant_res.o -LC:/qt/2010.04/qt/plugins/sqldrive
rs -lQtHelpd -lQtSqld -lQtXmld -lQtGuid -lQtNetworkd -lQtCLucened -lcomdlg32 -lo
leaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lssleay32 -llibeay32 -lgdi32 -lQtC
ored -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 -Lc:/opens
sl
c:/qt/2010.04/qt/lib\libQtGuid.a(qapplication.o): In function `ZN12QApplicationD
2Ev':
c:/qt/2010.04/qt/src/gui/kernel/qapplication.cpp:1018: undefined reference to `_
imp___Z21qt_call_post_routinesv'
c:/qt/2010.04/qt/lib\libQtGuid.a(qapplication.o): In function `ZN12QApplicationD
1Ev':
c:/qt/2010.04/qt/src/gui/kernel/qapplication.cpp:1018: undefined reference to `_
imp___Z21qt_call_post_routinesv'
c:/qt/2010.04/qt/lib\libQtGuid.a(qapplication.o): In function `ZN12QApplicationD
0Ev':
c:/qt/2010.04/qt/src/gui/kernel/qapplication.cpp:1018: undefined reference to `_
imp___Z21qt_call_post_routinesv'
c:/qt/2010.04/qt/lib\libQtGuid.a(qwhatsthis.o): In function `ZN10QWhatsThis8hide
TextEv':
c:/qt/2010.04/qt/src/gui/kernel/qwhatsthis.cpp:758: undefined reference to `_imp
___Z21qDeleteInEventHandlerP7QObject'
collect2: ld returned 1 exit status
mingw32-make[5]: *** [../../../../bin/assistant.exe] Error 1
mingw32-make[5]: Leaving directory `c:/qt/2010.04/qt/tools/assistant/tools/assis
tant'
mingw32-make[4]: *** [debug-all] Error 2
mingw32-make[4]: Leaving directory `c:/qt/2010.04/qt/tools/assistant/tools/assis
tant'
mingw32-make[3]: *** [sub-assistant-make_default-ordered] Error 2
mingw32-make[3]: Leaving directory `c:/qt/2010.04/qt/tools/assistant/tools'
mingw32-make[2]: *** [sub-tools-make_default-ordered] Error 2
mingw32-make[2]: Leaving directory `c:/qt/2010.04/qt/tools/assistant'
mingw32-make[1]: *** [sub-assistant-make_default-ordered] Error 2
mingw32-make[1]: Leaving directory `c:/qt/2010.04/qt/tools'
mingw32-make: *** [sub-tools-make_default-ordered] Error 2

manekineko
24th July 2010, 20:37
Found this thread discussing the same issue:
http://www.qtcentre.org/threads/31684-Problems-creating-Qt-4.6.3-static-with-MinGw

Apparently, 4.6.3 cannot be compiled static with gui apps due to a bug. I tried again with 4.6.2, and your advice worked perfectly, thanks again!