[vtkusers] Link errors when building VTK CVS

clinton at elemtech.com clinton at elemtech.com
Tue Oct 28 13:32:03 EDT 2008


Or upgrade your CMake.  FindQt4.cmake takes care of those details when linking 
against a static Qt library.

Clint

>
> Alternatively, you could look up what library the associated functions are
> implemented in and add that as a link library.
> Google for "ImmAssociateContext site:microsoft.com" yields this page:
> http://msdn.microsoft.com/en-us/library/ms776077(VS.85).aspx
>
> ...which indicates that ImmAssociateContext is implemented in the
> Imm32.lib library,
> so adding a "TARGET_LINK_LIBRARIES(blah imm32)" should actually fix some of
> the link errors. (Where "blah" obviously, is your target.) Make it
> conditional on Windows in CMake using "IF(WIN32)" if your project is
> cross-platform.
>
> Use a similar technique if necessary to figure out what other libraries
> need to be linked if there are any remaining link errors...
>
>
> HTH,
> David
>
> On Tue, Oct 28, 2008 at 5:26 AM, Dominik Szczerba 
<dominik at itis.ethz.ch>wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > I have successfully built VTK with QT 4.4.3 and Visual Studio 9.
> > I recall the same linking errors (at least a first few).
> > I just disabled accessibility support in QT (didn't need it anyway)
> >
> > Dominik
> >
> > wassim_belhadj at topnet.tn wrote:
> > > Dear
> > >
> > > I'am using Qt 4.4.2 + VTK CVS  + Microsoft Visual Studio 2005
> > >
> > > I downloded the VTK CVS when i tried to buld it i have got many link
> > > errors. It seems that VTK CVS don't compiles against Qt 4.4.X.
> > >
> > > Here the errors stack:
> > >
> > > error LNK2019: unresolved external symbol
> > > __imp__PlaySoundA at 12referenced in function "public: static void __cdecl
> > > QAccessible::updateAccessibility(class QObject *,int,enum
> > > QAccessible::Event)"
> > > (?updateAccessibility at QAccessible@@SAXPAVQObject@@HW4Event at 1@@Z)
> >
> >  QtGui.lib
> >
> > > error LNK2019: unresolved external symbol
> > > __imp__PlaySoundW at 12referenced in function "public: static void __cdecl
> > > QAccessible::updateAccessibility(class QObject *,int,enum
> > > QAccessible::Event)"
> > > (?updateAccessibility at QAccessible@@SAXPAVQObject@@HW4Event at 1@@Z)
> >
> >  QtGui.lib
> >
> > > error LNK2019: unresolved external symbol
> > > _ImmAssociateContext at 8referenced in function "void __cdecl
> > > enableIme(class QWidget *,bool)"
> > > (?enableIme@@YAXPAVQWidget@@_N at Z)     QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol _ImmGetCompositionStringA at 16
> > > referenced in function "long __cdecl getCompositionString(struct HIMC__
> > > *,unsigned long,void *,unsigned long,bool *)"
> > > (?getCompositionString@@YAJPAUHIMC__@@KPAXKPA_N at Z)    QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol _ImmGetCompositionStringW at 16
> > > referenced in function "long __cdecl getCompositionString(struct HIMC__
> > > *,unsigned long,void *,unsigned long,bool *)"
> > > (?getCompositionString@@YAJPAUHIMC__@@KPAXKPA_N at Z)    QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol _ImmGetContext at 4 referenced
> > > in function "struct HIMC__ * __cdecl getContext(struct HWND__ *)"
> > > (?getContext@@YAPAUHIMC__@@PAUHWND__@@@Z)     QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol
> > > _ImmGetDefaultIMEWnd at 4referenced in function "struct HWND__ * __cdecl
> > > getDefaultIMEWnd(struct HWND__ *)"
> > > (?getDefaultIMEWnd@@YAPAUHWND__@@PAU1@@Z)     QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol _ImmNotifyIME at 16 referenced
> > > in function "void __cdecl notifyIME(struct HIMC__ *,unsigned
> > > long,unsigned long,unsigned long)" (?notifyIME@@YAXPAUHIMC__@@KKK at Z)  
> > >      QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol
> > > _ImmReleaseContext at 8referenced in function "void __cdecl
> > > releaseContext(struct HWND__ *,struct HIMC__
> >
> > *)"
> >
> > > (?releaseContext@@YAXPAUHWND__@@PAUHIMC__@@@Z)        QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol _ImmSetCandidateWindow at 8
> > > referenced in function "public: virtual void __thiscall
> > > QWinInputContext::update(void)"
> > > (?update at QWinInputContext@@UAEXXZ)    QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol _ImmSetCompositionFontA at 8
> > > referenced in function "public: virtual void __thiscall
> > > QWinInputContext::update(void)"
> > > (?update at QWinInputContext@@UAEXXZ)    QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol _ImmSetCompositionFontW at 8
> > > referenced in function "public: virtual void __thiscall
> > > QWinInputContext::update(void)"
> > > (?update at QWinInputContext@@UAEXXZ)    QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol _ImmSetCompositionWindow at 8
> > > referenced in function "public: virtual void __thiscall
> > > QWinInputContext::update(void)"
> > > (?update at QWinInputContext@@UAEXXZ)    QtGui.lib
> > >
> > > error LNK2019: unresolved external symbol _WSAAsyncSelect at 16 referenced
> >
> > in
> >
> > > function "public: void __thiscall
> > > QEventDispatcherWin32Private::doWsaAsyncSelect(int)"
> > > (?doWsaAsyncSelect at QEventDispatcherWin32Private@@QAEXH at Z)
> >
> > QtCored.lib
> >
> > > fatal error LNK1120: 14 unresolved
> > > externals     C:\VTK_cvs\VTKData\bin\Debug\QVTKWidgetPlugin.dll
> > >
> > > Waitting for your help
> > > Best Regards





More information about the vtkusers mailing list