Hi,
I want to use OSG with QT. When I tried to compile the OSG source with QT,there 
happened some problem.

here is what I have:
VS2008 sp1 installed
Qt4.7.4sdk for VS2008 and Qt add-in for VS installed

so I followed the on the VS page

downloaded the SVN repository of osg3.0.0 generated the sln with CMake(It 
automatically found the QT executable"qmake.exe" and I checked to build QT 
examples).
So when I opened the .sln and tried to compile the ALL BUILD, some compile 
error come out.

Code:
Error   34      error LNK2019: unresolved external symbol _WSAAsyncSelect@16 
referenced in function "public: void __thiscall 
QEventDispatcherWin32Private::doWsaAsyncSelect(int)" 
(?doWsaAsyncSelect@QEventDispatcherWin32Private@@QAEXH@Z)     QtCored.lib
Error   35      error LNK2019: unresolved external symbol __imp__PlaySoundW@12 
referenced in function "public: static void __cdecl 
QAccessible::updateAccessibility(class QObject *,int,enum QAccessible::Event)" 
(?updateAccessibility@QAccessible@@SAXPAVQObject@@HW4Event@1@@Z)      QtGuid.lib
Error   36      error LNK2019: unresolved external symbol 
_ImmSetCandidateWindow@8 referenced in function "public: virtual void 
__thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)   
QtGuid.lib
Error   37      error LNK2019: unresolved external symbol 
_ImmSetCompositionWindow@8 referenced in function "public: virtual void 
__thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ) 
QtGuid.lib
Error   38      error LNK2019: unresolved external symbol 
_ImmSetCompositionFontW@8 referenced in function "public: virtual void 
__thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)  
QtGuid.lib
Error   39      error LNK2019: unresolved external symbol _ImmGetContext@4 
referenced in function "struct HIMC__ * __cdecl getContext(struct HWND__ *)" 
(?getContext@@YAPAUHIMC__@@PAUHWND__@@@Z)       QtGuid.lib
Error   40      error LNK2019: unresolved external symbol _ImmReleaseContext@8 
referenced in function "void __cdecl releaseContext(struct HWND__ *,struct 
HIMC__ *)" (?releaseContext@@YAXPAUHWND__@@PAUHIMC__@@@Z)     QtGuid.lib
Error   41      error LNK2019: unresolved external symbol _ImmNotifyIME@16 
referenced in function "void __cdecl notifyIME(struct HIMC__ *,unsigned 
long,unsigned long,unsigned long)" (?notifyIME@@YAXPAUHIMC__@@KKK@Z) QtGuid.lib
Error   42      error LNK2019: unresolved external symbol 
_ImmGetCompositionStringW@16 referenced in function "long __cdecl 
getCompositionString(struct HIMC__ *,unsigned long,void *,unsigned long)" 
(?getCompositionString@@YAJPAUHIMC__@@KPAXK@Z)    QtGuid.lib
Error   43      error LNK2019: unresolved external symbol 
_ImmAssociateContext@8 referenced in function "void __cdecl enableIme(class 
QWidget *,bool)" (?enableIme@@YAXPAVQWidget@@_N@Z)        QtGuid.lib
Error   44      error LNK2019: unresolved external symbol 
_ImmGetDefaultIMEWnd@4 referenced in function "struct HWND__ * __cdecl 
getDefaultIMEWnd(struct HWND__ *)" (?getDefaultIMEWnd@@YAPAUHWND__@@PAU1@@Z)   
QtGuid.lib
Error   45      fatal error LNK1120: 11 unresolved externals    
E:\Projects\OSG\build\bin\osg80-osgQtd.dll




so the osgQt lib is failed and so the other modules depend on it. Then I looked 
up the property of osgQt and found that its additional dependencies property 
contains these.
D:\Qt\4.7.4\lib\QtCored.lib
D:\Qt\4.7.4\lib\QtGuid.lib
D:\Qt\4.7.4\lib\QtOpenGLd.lib
I thought these might be wrong(I saw some other posts said there should be 
QtCored4.lib etc),so I changed them into 
D:\Qt\4.7.4\lib\QtCored4.lib
D:\Qt\4.7.4\lib\QtGuid4.lib
D:\Qt\4.7.4\lib\QtOpenGLd4.lib
then I tried again, the error changed to this:

Code:
Error   1       error LNK2001: unresolved external symbol "private: static 
class QCoreApplication * QCoreApplication::self" 
(?self@QCoreApplication@@0PAV1@A)   QGraphicsViewAdapter.obj
Error   2       error LNK2001: unresolved external symbol "private: static 
class QCoreApplication * QCoreApplication::self" 
(?self@QCoreApplication@@0PAV1@A)   QWidgetImage.obj
Error   3       error LNK2001: unresolved external symbol "public: static 
struct QMetaObject const QObject::staticMetaObject" 
(?staticMetaObject@QObject@@2UQMetaObject@@B)     moc_QGraphicsViewAdapter.obj
Error   4       fatal error LNK1120: 2 unresolved externals     
E:\Projects\OSG\build\bin\osg80-osgQtd.dll




and this is all, had anyone here met such problem and knew how to deal with it?


Thank you!

Cheers,
D.qishen[/quote][/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43942#43942





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to