[vtkusers] vtkViewport linking problem in VS.net 2003.

ckchen@CIS ckchen.cis89g at nctu.edu.tw
Wed Dec 1 10:12:08 EST 2004


Hi~ I am a Newbie in vtk, and encounter some linking problems in MS. VS. net 
2003 when
I combine vtk and qt together.
In my program, the following code will cause linking problem, and I guess 
the problem is the
compiler can't find the proper vtkxxx.lib in the linking time when I use 
"RemoveActor( )" function.
Here is the code segment:

vtkRenderer *ren = vtkRenderer::New();
.....
ren->AddActor(mainActor);
...
ren->RemoveActor(mainActor);

The code works well when I remove "ren->RemoveActor(...)", and
Here is the error message:

Visualizer error LNK2019: unresolved external symbol "__declspec(dllimport) 
public: void __thiscall vtkViewport::RemovePropW(class vtkProp *)" 
(__imp_?RemovePropW at vtkViewport@@QAEXPAVvtkProp@@@Z) referenced in function 
"private: void __thiscall QVTKFrame::Pipeline(void)" 
(?Pipeline at QVTKFrame@@AAEXXZ)

I have already include every vtkxxx.lib in solution's property list
=> Linker->Input->Additional Dependencie =>
qt-mt323.lib qtmain.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib 
advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib 
winspool.lib
delayimp.lib glu32.lib opengl32.lib
vtkRendering.lib vtkIO.lib vtkHybrid.lib vtkGraphics.lib vtkImaging.lib 
vtkftgl.lib  vtkfreetype.lib vtkFiltering.lib vtkCommon.lib vtkpng.lib 
vtktiff.lib vtkzlib.lib vtkjpeg.lib vtkexpat.lib vtkPatented.lib 
vtkParallel.lib

Can anyone tell me what's wrong with my solution? Do I miss something in 
configuration setup?

Kavin. 





More information about the vtkusers mailing list