maxpower
18th January 2007, 21:25
*Nevermind, for some reason my .prl files didn't get updated, got 'em updated and everything works fine now*
I am trying to build an application using qt 4.2.2 with static libraries. I have run configure -static -release and make sub-src. Both completed without problems. When I run make clean qmake -config release on one of the example programs, the generated Makefile is still point to -lQtCore4 and -lQtGui4 and therefore not to the static libs (-lQtCore -lQtGui as I understand it). If I modify the Makefile to use the 4-less versions, I get about billion errors like the following:
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x279a):qfs fileeng
ine_win.cpp: undefined reference to `IID_IPersistFile'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2a4d):qfs fileeng
ine_win.cpp: undefined reference to `CoUninitialize@0'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2a65):qfs fileeng
ine_win.cpp: undefined reference to `CoInitialize@4'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2a96):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2ab7):qfs fileeng
ine_win.cpp: undefined reference to `CoInitialize@4'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2ae8):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2cc3):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2dd8):qfs fileeng
ine_win.cpp: undefined reference to `IID_IPersistFile'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2f76):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x31df):qfs fileeng
ine_win.cpp: undefined reference to `IID_IPersistFile'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x33a7):qfs fileeng
ine_win.cpp: undefined reference to `CoUninitialize@0'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x35b2):qfs fileeng
ine_win.cpp: undefined reference to `CoInitialize@4'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x35e3):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x3627):qfs fileeng
ine_win.cpp: undefined reference to `CoUninitialize@0'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x364f):qfs fileeng
ine_win.cpp: undefined reference to `CoInitialize@4'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x3680):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\calculator.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.2.2-Static/examples/widgets/calculat
or'
mingw32-make: *** [release] Error 2
Any ideas on what I am missing? This is on WinXp SP2 with Qt 4.2.2.
thanks
mAx
I am trying to build an application using qt 4.2.2 with static libraries. I have run configure -static -release and make sub-src. Both completed without problems. When I run make clean qmake -config release on one of the example programs, the generated Makefile is still point to -lQtCore4 and -lQtGui4 and therefore not to the static libs (-lQtCore -lQtGui as I understand it). If I modify the Makefile to use the 4-less versions, I get about billion errors like the following:
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x279a):qfs fileeng
ine_win.cpp: undefined reference to `IID_IPersistFile'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2a4d):qfs fileeng
ine_win.cpp: undefined reference to `CoUninitialize@0'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2a65):qfs fileeng
ine_win.cpp: undefined reference to `CoInitialize@4'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2a96):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2ab7):qfs fileeng
ine_win.cpp: undefined reference to `CoInitialize@4'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2ae8):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2cc3):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2dd8):qfs fileeng
ine_win.cpp: undefined reference to `IID_IPersistFile'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x2f76):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x31df):qfs fileeng
ine_win.cpp: undefined reference to `IID_IPersistFile'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x33a7):qfs fileeng
ine_win.cpp: undefined reference to `CoUninitialize@0'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x35b2):qfs fileeng
ine_win.cpp: undefined reference to `CoInitialize@4'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x35e3):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x3627):qfs fileeng
ine_win.cpp: undefined reference to `CoUninitialize@0'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x364f):qfs fileeng
ine_win.cpp: undefined reference to `CoInitialize@4'
c:\Qt\4.2.2-Static\lib/libQtCore.a(qfsfileengine_win.o)(.text+0x3680):qfs fileeng
ine_win.cpp: undefined reference to `CoCreateInstance@20'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\calculator.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.2.2-Static/examples/widgets/calculat
or'
mingw32-make: *** [release] Error 2
Any ideas on what I am missing? This is on WinXp SP2 with Qt 4.2.2.
thanks
mAx