[vtkusers] Adding a new class for use in Tcl
Martin Thornalley
martin_thornalley at hotmail.com
Wed Jul 24 03:35:16 EDT 2002
I have followed the instructions in the README.html of the vtk4.0 source to
add a new class to a local source tree under Linux. I am, however, having
difficulties using this new class in Tcl.
The class appears to compile correctly and can be linked to in a C++
program. When I attempt to use it in Tcl I get the folowing error:
Error in startup script: invalid command name "vtkPolyDataTextureFilter"
while executing
"vtkPolyDataTextureFilter texFilter"
(file "test.tcl" line 21)
The CMakeLists.txt that I am using is below which has been modfied from the
VTK/IO version. I presume I have some incorrect settings in here but I guess
it's also possible that I am missing some other steps. Does anyone have any
suggestions?
Regards,
Martin Thornalley.
SOURCE_FILES( Local_SRCS
vtkPolyDataTextureFilter
)
#ABSTRACT_FILES(
#)
ADD_LIBRARY(vtkLocal Local_SRCS)
# Allow the user to customize their build with some local options
#
INCLUDE (${VTK_BINARY_DIR}/Local/LocalUserOptions.cmake OPTIONAL)
INCLUDE (${VTK_SOURCE_DIR}/Local/LocalUserOptions.cmake OPTIONAL)
# if we are wrapping into Tcl then add the library and extra
# source files
#
IF (VTK_WRAP_TCL)
VTK_WRAP_TCL(vtkLocalTCL LocalTCL_SRCS Local_SRCS)
ADD_LIBRARY(vtkLocalTCL LocalTCL_SRCS)
TARGET_LINK_LIBRARIES (vtkLocalTCL
vtkFilteringTCL
vtkCommonTCL
${TCL_LIBRARY})
INSTALL_TARGETS(/lib/vtk vtkLocalTCL)
ENDIF (VTK_WRAP_TCL)
# if we are wrapping into Java then add the library and extra
# source files
#
IF (VTK_WRAP_JAVA)
VTK_WRAP_JAVA(vtkLocalJava LocalJava_SRCS Local_SRCS)
ADD_LIBRARY(vtkLocalJava SHARED LocalJava_SRCS)
TARGET_LINK_LIBRARIES (vtkLocalJava
vtkCommonJava
vtkFilteringJava)
INSTALL_TARGETS(/lib/vtk vtkLocalJava)
ENDIF (VTK_WRAP_JAVA)
LINK_LIBRARIES (
vtkCommon
vtkFiltering
vtkLocal
)
IF(WIN32)
IF(UNIX)
IF(NOT BUILD_SHARED_LIBS)
ADD_DEFINITIONS(-DPNG_STATIC)
ENDIF(NOT BUILD_SHARED_LIBS)
ENDIF(UNIX)
ENDIF(WIN32)
IF(WIN32)
IF(NOT BUILD_SHARED_LIBS)
ADD_DEFINITIONS(-DJPEGSTATIC)
ENDIF(NOT BUILD_SHARED_LIBS)
ENDIF(WIN32)
INSTALL_TARGETS(/lib/vtk vtkLocal)
INSTALL_FILES(/include/vtk .h Local_SRCS)
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
More information about the vtkusers
mailing list