[Solved] static build probs (Visual Studio.Net 2003)
hi there,
I just tried to compile my project(no pobs with a shared qt release) with a fresh static build of qt, but somehow, I still have link errors because of some windows dependencies:
changed win32-msvc.net mkspecs as described here
Code:
//from
QMAKE_CFLAGS_RELEASE = -O1 -MD -DNDEBUG
//to
QMAKE_CFLAGS_RELEASE = -O2 -MT -DNDEBUG
static build configuration (using qtwin patch):
Code:
qconfigure msvc.net -prefix C:\devel\qt4s -static -release -qt-sql-odbc -qt-sql-sqlite -no-exceptions
compiled using just
added
Code:
CONFIG += staticlib
to my *.pro file
then I created the VS Project file using
Code:
qmake -tp -vc -spec
I get the following link errors, when compiling my project:
Quote:
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmGetDefaultIMEWnd@4', verwiesen in Funktion '"struct HWND__ * __cdecl getDefaultIMEWnd(struct HWND__ *)" (?getDefaultIMEWnd@@YAPAUHWND__@@PAU1@@Z)'
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmGetContext@4', verwiesen in Funktion '"struct HIMC__ * __cdecl getContext(struct HWND__ *)" (?getContext@@YAPAUHIMC__@@PAUHWND__@@@Z)'
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmReleaseContext@8', verwiesen in Funktion '"void __cdecl releaseContext(struct HWND__ *,struct HIMC__ *)" (?releaseContext@@YAXPAUHWND__@@PAUHIMC__@@@Z)'
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmNotifyIME@16', verwiesen in Funktion '"void __cdecl notifyIME(struct HIMC__ *,unsigned long,unsigned long,unsigned long)" (?notifyIME@@YAXPAUHIMC__@@KKK@Z)'
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmGetCompositionStringA@16', verwiesen in Funktion '"long __cdecl getCompositionString(struct HIMC__ *,unsigned long,void *,unsigned long,bool *)" (?getCompositionString@@YAJPAUHIMC__@@KPAXKPA_N@Z) '
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmGetCompositionStringW@16', verwiesen in Funktion '"long __cdecl getCompositionString(struct HIMC__ *,unsigned long,void *,unsigned long,bool *)" (?getCompositionString@@YAJPAUHIMC__@@KPAXKPA_N@Z) '
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmAssociateContext@8', verwiesen in Funktion '"public: static void __cdecl QWinInputContext::enable(class QWidget *,bool)" (?enable@QWinInputContext@@SAXPAVQWidget@@_N@Z)'
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmSetCandidateWindow@8', verwiesen in Funktion '"public: virtual void __thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)'
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmSetCompositionWindow@8', verwiesen in Funktion '"public: virtual void __thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)'
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmSetCompositionFontA@8', verwiesen in Funktion '"public: virtual void __thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)'
QtGui.lib(qwininputcontext_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_ImmSetCompositionFontW@8', verwiesen in Funktion '"public: virtual void __thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)'
QtGui.lib(qaccessible_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__PlaySoundA@12', verwiesen in Funktion '"public: static void __cdecl QAccessible::updateAccessibility(class QObject *,int,enum QAccessible::Event)" (?updateAccessibility@QAccessible@@SAXPAVQObject@@ HW4Event@1@@Z)'
QtCore.lib(qeventdispatcher_win.obj) : error LNK2019: Nicht aufgelöstes externes Symbol '_WSAAsyncSelect@16', verwiesen in Funktion '"public: void __thiscall QEventDispatcherWin32Private::doWsaAsyncSelect(int )" (?doWsaAsyncSelect@QEventDispatcherWin32Private@@Q AEXH@Z)'
release\myapp.exe : fatal error LNK1120: 13 unaufgelöste externe Verweise
EDIT:
recompiled without changing the win32-msvc.net mkspecs, but the link errors are the same as above :(
so where's the prob???
regards
darksaga
Re: static build probs (Visual Studio.Net 2003)
found out that I'm missing some ms specific libs,
something concerning the coredll module of the Platform Builder for Microsoft Windows CE 5.0
first lib I'm missing is: Coreimm.lib link, this lib should solve link probs 1-11
searched my system for this file, but it's nowhere to be found :(
anybody knows what I have to install/download to get this file
Re: [Solved] static build probs (Visual Studio.Net 2003)
found a simple solution, thx @ google
added
Code:
LIBS += Imm32.lib Winmm.lib ws2_32.lib
to my *.pro file
now everything compiles fine, Yippee :D