[vtkusers] Link problem

Uwe Graichen graichen at informatik.uni-leipzig.de
Fri Sep 14 08:20:25 EDT 2001


I use VTK 3.2 together with qt 2.3 on a WinNT 4.0 System with VC++6.0.

If I compile my program in the debug mode everything works fine. The
compiler options for the debug mode are:

/nologo /MD /W3 /Gm /ZI /Od /I "$(QTDIR)\include" /D "WIN32" /D "_DEBUG" 
/D "_WINDOWS" /D "_MBCS" /D "QT_DLL" /D "UNICODE" /D "QT_THREAD_SUPPORT" 
/FR"Debug/" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c

and the linker options:

glu32.lib opengl32.lib vtkdll.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 $(QTDIR)\lib\qt-mt230nc.lib 
$(QTDIR)\lib\qtmain.lib /nologo /subsystem:windows /incremental:yes 
/pdb:"Debug/application.pdb" /debug /machine:I386 /nodefaultlib:"libc" 
/out:"Debug/application.exe" /pdbtype:sept


But if I change to the release mode I get the linker error:

unresolved external symbol "__declspec(dllimport) public: void
__thiscall vtkViewport::RemovePropW(class vtkProp *)"
(__imp_?RemovePropW at vtkViewport@@QAEXPAVvtkProp@@@Z)

The options for this mode are, compiler:

/nologo /MD /W3 /O2 /I "$(QTDIR)\include" /D "WIN32" /D "NDEBUG" /D 
"_WINDOWS" /D "_MBCS" /D "QT_DLL" /D "UNICODE" /D "QT_THREAD_SUPPORT" 
/Fo"Release/" /Fd"Release/" /FD /c

and for the linker:

glu32.lib opengl32.lib glaux.lib vtkdll.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 $(QTDIR)\lib\qt-mt230nc.lib 
$(QTDIR)\lib\qtmain.lib /nologo /subsystem:windows /incremental:no 
/pdb:"Release/application.pdb" /machine:I386 /nodefaultlib:"libc" 
/out:"Release/application.exe"

The error seems anyhow connected with the RemoveActor and RemoveVolume 
commands in the program.

Any ideas why I get this error?

Thanks Uwe




More information about the vtkusers mailing list