Alternatively, you could look up what library the associated functions are implemented in and add that as a link library.<div><br></div><div>Google for "ImmAssociateContext site:<a href="http://microsoft.com">microsoft.com</a>" yields this page:</div>
<div><a href="http://msdn.microsoft.com/en-us/library/ms776077(VS.85).aspx">http://msdn.microsoft.com/en-us/library/ms776077(VS.85).aspx</a></div><div><br></div><div>...which indicates that ImmAssociateContext is implemented in the <span class="Apple-style-span" style="font-family: Verdana; font-size: 11px; line-height: 15px; ">Imm32.lib </span>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.</div>
<div><br></div><div>Use a similar technique if necessary to figure out what other libraries need to be linked if there are any remaining link errors...</div><div><br></div><div><br></div><div>HTH,</div><div>David</div><div>
<br></div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Tue, Oct 28, 2008 at 5:26 AM, Dominik Szczerba <span dir="ltr"><<a href="mailto:dominik@itis.ethz.ch">dominik@itis.ethz.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
I have successfully built VTK with QT 4.4.3 and Visual Studio 9.<br>
I recall the same linking errors (at least a first few).<br>
I just disabled accessibility support in QT (didn't need it anyway)<br>
<br>
Dominik<br>
<div><div></div><div class="Wj3C7c"><br>
<a href="mailto:wassim_belhadj@topnet.tn">wassim_belhadj@topnet.tn</a> wrote:<br>
> Dear<br>
><br>
> I'am using Qt 4.4.2 + VTK CVS + Microsoft Visual Studio 2005<br>
><br>
> I downloded the VTK CVS when i tried to buld it i have got many link<br>
> errors. It seems that VTK CVS don't compiles against Qt 4.4.X.<br>
><br>
> Here the errors stack:<br>
><br>
> error LNK2019: unresolved external symbol __imp__PlaySoundA@12 referenced<br>
> in function "public: static void __cdecl<br>
> QAccessible::updateAccessibility(class QObject *,int,enum<br>
> QAccessible::Event)"<br>
> (?updateAccessibility@QAccessible@@SAXPAVQObject@@HW4Event@1@@Z) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol __imp__PlaySoundW@12 referenced<br>
> in function "public: static void __cdecl<br>
> QAccessible::updateAccessibility(class QObject *,int,enum<br>
> QAccessible::Event)"<br>
> (?updateAccessibility@QAccessible@@SAXPAVQObject@@HW4Event@1@@Z) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmAssociateContext@8 referenced<br>
> in function "void __cdecl enableIme(class QWidget *,bool)"<br>
> (?enableIme@@YAXPAVQWidget@@_N@Z) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmGetCompositionStringA@16<br>
> referenced in function "long __cdecl getCompositionString(struct HIMC__<br>
> *,unsigned long,void *,unsigned long,bool *)"<br>
> (?getCompositionString@@YAJPAUHIMC__@@KPAXKPA_N@Z) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmGetCompositionStringW@16<br>
> referenced in function "long __cdecl getCompositionString(struct HIMC__<br>
> *,unsigned long,void *,unsigned long,bool *)"<br>
> (?getCompositionString@@YAJPAUHIMC__@@KPAXKPA_N@Z) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmGetContext@4 referenced in<br>
> function "struct HIMC__ * __cdecl getContext(struct HWND__ *)"<br>
> (?getContext@@YAPAUHIMC__@@PAUHWND__@@@Z) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmGetDefaultIMEWnd@4 referenced<br>
> in function "struct HWND__ * __cdecl getDefaultIMEWnd(struct HWND__ *)"<br>
> (?getDefaultIMEWnd@@YAPAUHWND__@@PAU1@@Z) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmNotifyIME@16 referenced in<br>
> function "void __cdecl notifyIME(struct HIMC__ *,unsigned long,unsigned<br>
> long,unsigned long)" (?notifyIME@@YAXPAUHIMC__@@KKK@Z) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmReleaseContext@8 referenced<br>
> in function "void __cdecl releaseContext(struct HWND__ *,struct HIMC__ *)"<br>
> (?releaseContext@@YAXPAUHWND__@@PAUHIMC__@@@Z) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmSetCandidateWindow@8<br>
> referenced in function "public: virtual void __thiscall<br>
> QWinInputContext::update(void)"<br>
> (?update@QWinInputContext@@UAEXXZ) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmSetCompositionFontA@8<br>
> referenced in function "public: virtual void __thiscall<br>
> QWinInputContext::update(void)"<br>
> (?update@QWinInputContext@@UAEXXZ) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmSetCompositionFontW@8<br>
> referenced in function "public: virtual void __thiscall<br>
> QWinInputContext::update(void)"<br>
> (?update@QWinInputContext@@UAEXXZ) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _ImmSetCompositionWindow@8<br>
> referenced in function "public: virtual void __thiscall<br>
> QWinInputContext::update(void)"<br>
> (?update@QWinInputContext@@UAEXXZ) QtGui.lib<br>
><br>
> error LNK2019: unresolved external symbol _WSAAsyncSelect@16 referenced in<br>
> function "public: void __thiscall<br>
> QEventDispatcherWin32Private::doWsaAsyncSelect(int)"<br>
> (?doWsaAsyncSelect@QEventDispatcherWin32Private@@QAEXH@Z) QtCored.lib<br>
><br>
> fatal error LNK1120: 14 unresolved<br>
> externals C:\VTK_cvs\VTKData\bin\Debug\QVTKWidgetPlugin.dll<br>
><br>
> Waitting for your help<br>
> Best Regards<br>
><br>
><br>
> _______________________________________________<br>
> This is the private VTK discussion list.<br>
> Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
<br>
</div></div>- --<br>
Dominik Szczerba, Ph.D.<br>
Computational Physics Group<br>
Foundation for Research<br>
on Information Technologies in Society<br>
<a href="http://www.itis.ethz.ch" target="_blank">http://www.itis.ethz.ch</a><br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2.0.4-svn0 (GNU/Linux)<br>
Comment: Using GnuPG with SUSE - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br>
iD8DBQFJBtre/EBMh9bUuzIRAsusAJwOTUda6Evq1tL5pKulQmt7sT7blQCgv/YG<br>
L/c/NOYXCBE5jC3GrO8DW6w=<br>
=Wn8Y<br>
-----END PGP SIGNATURE-----<br>
<div><div></div><div class="Wj3C7c">_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>