[vtkusers] vtkandqt library conflicts
Clinton Stimpson
clinton at elemtech.com
Thu Mar 27 09:41:37 EST 2003
You need to link with opengl32.lib to get rid of the gl related unresolved
symbols.
You also need to define QT_DLL in the preprocessor defines to get rid of
the linking errors related to QString.
And you need to run Qt's moc on RenderWindow and RenderWindowInteractor and
include those mocced files into your project. That'll get rid of the rest
of the errors.
Note: I have found a few problems with a few of vtk/qt integrations I've
seen. If the renderwindow is derived from QGLWidget, it leaks some memory
because Qt tries setting up OpenGL stuff which VTK does too. If it doesn't
integrate a vtkRenderWindowInteractor, some VTK features can't be used
(interactor observors which include 3D widgets for example). I ended up
writing my own which requires VTK 4.2 and uses vtkRenderWindow and
vtkGenericRenderWindowInteractor and doesn't require Qt's opengl module.
Clint
> --__--__--
>
> Message: 5
> Date: Wed, 26 Mar 2003 14:33:35 -0800 (PST)
> From: Seema Jaisinghani <seemri at yahoo.com>
> Reply-To: seemri at yahoo.com
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] vtkandqt library conflicts
>
> Hello,
>
> I have been trying to use vtkandqt classes( by jan
> Stifler) to combine vtk 4.0 and qt2.3 applications.
> Both Vtk 4.0 and qt are running fine on my system (I
> am working on Windows XP), but I am unable to link all
> of them together in VC++. I am getting errors
> regarding conflict between libraries (an msvcrt
> conflict warning and then 15errors).In my project
> settings, I have given link input to vtk .libs and to
> libs in qt/lib/ along with debug multithreaded dll
> option in C/C++ code generation.
> These errors are related to the vtkandqt classes. I
> have tried both including and excluding the vtkandqt
> .cpp files in my project, but hasn't worked.
>
> Could anyone please give me some pointers or hints how
> to get it working.
>
> Thanks for the help,
>
> Seema
>
> Generating Code...
> Linking...
> MSVCRTD.lib(cinitexe.obj) : warning LNK4098:
> defaultlib "msvcrt.lib" conflicts with use of other
> libs; use /NODEFAULTLIB:library
> interactormain.obj : error LNK2001: unresolved
> external symbol "private: static struct QStringData *
> QString::shared_null"
> (?shared_null at QString@@0PAUQStringData@@A)
> renderwindowinteractor.obj : error LNK2001: unresolved
> external symbol "protected: virtual void __thiscall
> RenderWindowInteractor::initMetaObject(void)"
> (?initMetaObject at RenderWindowInteractor@@MAEXXZ)
> renderwindowinteractor.obj : error LNK2001: unresolved
> external symbol "public: virtual char const *
> __thiscall
> RenderWindowInteractor::className(void)const "
> (?className at RenderWindowInteractor@@UBEPBDXZ)
> renderwindowinteractor.obj : error LNK2001: unresolved
> external symbol "public: static class QMetaObject *
> __cdecl
> RenderWindowInteractor::staticMetaObject(void)"
> (?staticMetaObject at RenderWindowInteractor@@SAPAVQMetaObject@@XZ)
> renderwindowinteractor.obj : error LNK2001: unresolved
> external symbol "protected: void __thiscall
> RenderWindowInteractor::Released(int,int)"
> (?Released at RenderWindowInteractor@@IAEXHH at Z)
> renderwindowinteractor.obj : error LNK2001: unresolved
> external symbol "protected: void __thiscall
> RenderWindowInteractor::ActorRotated(float,float)"
> (?ActorRotated at RenderWindowInteractor@@IAEXMM at Z)
> renderwindowinteractor.obj : error LNK2001: unresolved
> external symbol "protected: void __thiscall
> RenderWindowInteractor::ActorRolled(float)"
> (?ActorRolled at RenderWindowInteractor@@IAEXM at Z)
> renderwindow.obj : error LNK2001: unresolved external
> symbol "protected: virtual void __thiscall
> RenderWindow::initMetaObject(void)"
> (?initMetaObject at RenderWindow@@MAEXXZ)
> renderwindow.obj : error LNK2001: unresolved external
> symbol "public: virtual char const * __thiscall
> RenderWindow::className(void)const "
> (?className at RenderWindow@@UBEPBDXZ)
> renderwindow.obj : error LNK2001: unresolved external
> symbol "public: static class QMetaObject * __cdecl
> RenderWindow::staticMetaObject(void)"
> (?staticMetaObject at RenderWindow@@SAPAVQMetaObject@@XZ)
> renderwindow.obj : error LNK2001: unresolved external
> symbol __imp__glColor3f at 12
> renderwindow.obj : error LNK2001: unresolved external
> symbol __imp__glClearColor at 16
> renderwindow.obj : error LNK2001: unresolved external
> symbol _gluOrtho2D at 32
> renderwindow.obj : error LNK2001: unresolved external
> symbol __imp__glLoadIdentity at 0
> renderwindow.obj : error LNK2001: unresolved external
> symbol __imp__glMatrixMode at 4
> Debug/interactor.exe : fatal error LNK1120: 15
> unresolved externals
> Error executing link.exe.
>
> interactor.exe - 16 error(s), 1 warning(s)
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
>
More information about the vtkusers
mailing list