PDA

View Full Version : Error while statically compiling qt



rforums
22nd December 2010, 10:07
I was compiling qt as described here
http://developer.qt.nokia.com/wiki/How_to_build_a_static_Qt_version_for_Windows_with_ gcc

But when i do call mingw32-make.exe,
i get this error after a couple of hours..
Any help would be appreciated

g++ -static -static-libgcc -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,windows -o ..\..\bin\qmlviewer.exe object_script.qmlviewer.Debug -L"c:\Qt\2010.05\qt-static\lib" -L"c:\Qt\20
10.05\qt-static\lib" -lmingw32 -lqtmaind -lQtDeclaratived -lQtScriptd -lQtSvgd -lQtSqld -lQtOpenGLd -lQtNetworkd -lglu32 -lopengl32 -lQtGuid -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCored -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 c:\Qt\2010.05\qt-static\lib\libQtDeclaratived.a(qdeclarativevaluety pe.o):C:\Qt\2010.05\qt-static\src\declarative/qml/qdeclarativevaluetype.cpp:916: undefined reference to `_imp___Z13qt_defaultDpiv'
c:\Qt\2010.05\qt-static\lib\libQtDeclaratived.a(qdeclarativevaluety pe.o):C:\Qt\2010.05\qt-static\src\declarative/qml/qdeclarativevaluetype.cpp:941: undefined reference to `_imp___Z13qt_defaultDpiv'
collect2: ld returned 1 exit status
mingw32-make.exe[3]: *** [..\..\bin\qmlviewer.exe] Error 1
mingw32-make.exe[3]: Leaving directory `C:/Qt/2010.05/qt-static/tools/qml'
mingw32-make.exe[2]: *** [debug-all] Error 2
mingw32-make.exe[2]: Leaving directory `C:/Qt/2010.05/qt-static/tools/qml'
mingw32-make.exe[1]: *** [sub-qml-make_default-ordered] Error 2
mingw32-make.exe[1]: Leaving directory `C:/Qt/2010.05/qt-static/tools'
mingw32-make.exe: *** [sub-tools-make_default-ordered] Error 2

tetsuoii
4th January 2011, 03:54
I have the same problem, and it would be great if someone has a clue as how to fix it.

javimoya
8th January 2011, 22:24
i wrote this tutorial
http://www.qtcentre.org/threads/37144-TUTORIAL-how-to-compile-qt-qtcreator-and-libqxt-on-Windows-Mingw-%28with-openssl%29?highlight=

maybe it helps you

kosasker
29th January 2011, 09:24
@javimoya : can i make a stand alone application with your tutorial ???

I tried before tutorial at, http://www.qtcentre.org/wiki/index.php?title=Building_static_Qt_on_Windows ... but when my application deployed, i cant show my icons again. Before static compile everythings goes well. After static compile, my icons has lost and my system calls (like stdout of a process) doesnt work.

Is your tutorial can help me ???

Thanks a lot.

kosasker
29th January 2011, 20:54
Hi again. I solved my problems.

First, i can't do your tutor. Because its taking more time.

Second: i deleted all confs, all Qt, mingw and the others from my computer and i installed Qt SDK again. I made a release (not debug) for my app... And then, on my virtual machine i run it. Its give more errors :D I copied dll files, what the application wants. So at last i copied 7 file in my application work dir, and its run exactly.

After thas i packed it with Nsis (http://nsis.sourceforge.net/Main_Page).

Third: i can't stop... Because my installer package has a 40mb, and i refuse it... I build Qt for staticly again, i do it like trolls document. (yes, i know my english is bad... sorry about this... i'm working on it ) so, i find the wrong thing that i'm always doing...

After static config&build, i didnt check release from project properties!!!

It's important... I'm build it static but i waiting for dynamic working... I find my fault, and change it for release, and bingo!! it's runned...
So, my application size has down too... Its fall to 5 mb, from 40mb ... Its amazing...

Thanks a lot...

squidge
29th January 2011, 22:08
Don't forget the different licensing requirements of static builds.