[vtkusers] Problems in creating vtkLocalPython

Yuan Jin yjin76 at hotmail.com
Tue Jul 23 11:30:11 EDT 2002


Hi,

I am using vtk4.0/python and willing to build my own class into vtk. During 
the linking stage, it says "unresolved external symbol" as below,

--------------------Configuration: vtkLocalPython - Win32 
Release--------------------
Linking...
   Creating library D:/vtkbin/bin/Release/vtkLocalPython.lib and object 
D:/vtkbin/bin/Release/vtkLocalPython.exp
vtkClassNamePython.obj : error LNK2001: unresolved external symbol "public: 
__thiscall vtkClassName::vtkClassName(void)" (??vtkClassName@@QAE at XZ)
.
.
.
D:/vtkbin/bin/Release/vtkLocalPython.dll : fatal error LNK1120: 6 unresolved 
externals
Error executing link.exe.

ALL_BUILD - 7 error(s), 0 warning(s)


--------------
My CMakeList.txt in the local directory is like:

SOURCE_FILES( Local_SRCS
vtkClassName
)

ABSTRACT_FILES(
vtkClassName
)

IF (VTK_WRAP_PYTHON)
  IF (APPLE)
    ADD_LIBRARY(vtkLocalPython MODULE LocalPython_SRCS)
  ELSE (APPLE)
    ADD_LIBRARY(vtkLocalPython SHARED LocalPython_SRCS)
  ENDIF (APPLE)
  VTK_WRAP_PYTHON(vtkLocalPython LocalPython_SRCS Local_SRCS)
  TARGET_LINK_LIBRARIES (vtkLocalPython
				 vtkHybridPython
				 vtkRenderingPython
				 vtkIOPython
                         vtkGraphicsPython
                         vtkImagingPython
                         vtkFilteringPython
                         vtkCommonPython)
  IF(WIN32)
    TARGET_LINK_LIBRARIES (vtkLocalPython
                           debug ${PYTHON_DEBUG_LIBRARY}
                           optimized ${PYTHON_LIBRARY})
  ELSE(WIN32)
    TARGET_LINK_LIBRARIES (vtkLocalPython ${PYTHON_LIBRARY})
  ENDIF(WIN32)

  INSTALL_TARGETS(/lib/vtk vtkLocalPython)
ENDIF (VTK_WRAP_PYTHON)


The problem is in the wrap of python to vtk, Does anyone have this problem 
before?
The class is running well with C++. I am using Win NT.

Thanks a lot

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




More information about the vtkusers mailing list