[vtkusers] vtk 6.1 TCL Wrapping problem

Bill Lorensen bill.lorensen at gmail.com
Thu Jun 25 08:14:50 EDT 2015


Please keep the mailing list on the replies...

On Thu, Jun 25, 2015 at 2:19 AM, Franke, Stephan
<Stephan.Franke at inpro.de> wrote:
> Hallo Bill,
>
> first thanks for you replay.
> At the bottom of this reply you will find my CMakefile.
> In the file you will see that I am using the new libs from vtk 6.x (but it is possible that some libs are missing???).
> I had the same idea that some libs are missing or that the external symbols like
> Vtkcommontcl_Init and so on does not exists any more.
> But I am not sure because in the vtktcl.c file there are still exists.
>
> Regards,
> Stephan
>
>
> CMAKE FILE:
> ===========================================
> project(TCLKIT)
>
> set(TCLKIT_SRCS
>   kitInit.c
>   rechan.c
>   pwb.c
>   vfs.c
>   zlib.c
> )
>
> get_filename_component(TRY_TCL ${TCL_INCLUDE_PATH} PATH)
> get_filename_component(TRY_TK ${TK_INCLUDE_PATH} PATH)
>
> set(VTKIT_TCL_SRC ${TRY_TCL} CACHE PATH
>     "The root of the Tcl source code tree")
> set(VTKIT_TK_SRC ${TRY_TK} CACHE PATH
>     "The root of the Tk source code tree")
>
> # Platform independent rules
> include_directories("${VTKIT_TCL_SRC}/generic")
> include_directories("${VTKIT_TK_SRC}/generic")
> include_directories("${VTKIT_TK_SRC}/xlib")
> include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
> include_directories("${CMAKE_BINARY_DIR}")
> #include_directories(${VTK_SOURCE_DIR}/Utilities/vtkzlib "${CMAKE_CURRENT_SOURCE_DIR}")
>
> #link_directories(${VTK_TK_LIBRARY} ${VTK_TCL_LIBRARY})
> add_definitions(-DTK_LOCAL_APPINIT=TclKit_AppInit)
> add_definitions(-DKIT_INCLUDES_TK -DKIT_INCLUDES_VTK)
>
> # Platform dependent rules
> if(WIN32)
>    set(TCLKIT_SRCS ${TCLKIT_SRCS} ${VTKIT_TK_SRC}/win/winMain.c)
>    set(VTKIT_EXE_RESOURCE_FILES tclkit.rc )
>    IF (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
>       ADD_DEFINITIONS(-D_USE_32BIT_TIME_T)
>    ENDIF()
>    include_directories("${VTKIT_TCL_SRC}/win")
>    include_directories("${VTKIT_TK_SRC}/win/rc")
>    link_directories(${TCL_WIN_EXTRA_LIBS})
>    add_executable(tclkit WIN32 ${TCLKIT_SRCS} ${VTKIT_EXE_RESOURCE_FILES})
>    # Tcl/Tk is linked with /GL so tclkit could do with /LTCG ... on windows
>    set_target_properties(tclkit PROPERTIES LINK_FLAGS  "${LINK_FLAGS} -LTCG")
> else()
>    set(TCLKIT_SRCS ${TCLKIT_SRCS} ${VTKIT_TK_SRC}/unix/tkAppInit.c)
>    include_directories("${VTKIT_TCL_SRC}/unix")
>    include_directories("${VTKIT_TK_SRC}/unix")
>    if(APPLE)
>       include_directories("${VTKIT_TK_SRC}/macosx}")
>    endif()
>    add_executable(tclkit ${TCLKIT_SRCS})
> endif()
>
> if(VTK_USE_COCOA)
>     #Strange, but you have to link against the Carbon framework
>     target_link_libraries(tclkit "-framework Carbon")
> endif(VTK_USE_COCOA)
>
> message("VTK MAJOR NUMBER: ${VTK_MAJOR_VERSION}")
> message("VTK_MINOR_VERSION: ${VTK_MINOR_VERSION}")
> message ("VTK TCL WRAPPED: ${VTK_TCL_WRAPPED_MODULES}")
>
> # Libraries to link against
> SET(VTK_VERSION "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
> SET(VTK_LIBRARY_DIRS "${VTK_DIR}/lib/Release")
> target_link_libraries (tclkit
>   Mk4tcl
>   ${TCL_LIBRARY}
>   ${TK_LIBRARY}
>   ${VTK_LIBRARIES}
>   ${VTK_LIBRARY_DIRS}/vtk.lib
>   ${VTK_LIBRARY_DIRS}/vtkViewsInfovisTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkViewsGeovisTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkViewsCoreTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkViewsContextIIDTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingVolumeTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingVolumeOpenGLTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingVolumeAMRTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingTkTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingOpenGLTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingLODTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingLICTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingLabelTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingImageTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingGLtoPSTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingFreeTypeTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingFreeTypeOpenGLTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingCoreTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingContextIIDTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkRenderingAnnotationTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkParallelCoreTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOXMLTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOXMLParserTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOVideoTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOSQLTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOPLYTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOParallelTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIONetCDFTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOMovieTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOMINCTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOLSDynaTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOLegacyTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOInfovisTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOImportTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOImageTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOGeometryTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOExportTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOExodusTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOEnSightTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOCoreTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkIOAMRTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkInteractionWidgetsTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkInteractionStyleTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkInteractionImageTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkInfovisLayoutTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkInfovisCoreTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkImagingStencilTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkImagingStatisticsTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkImagingSourcesTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkImagingMorphologicalTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkImagingMathTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkImagingHybridTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkImagingGeneralTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkImagingFourierTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkImagingCoreTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkImagingColorTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkGeovisCoreTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersVerdictTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersTextureTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersStatisticsTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersSourcesTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersSMPTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersSelectionTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersProgrammableTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersParallelTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersParallelImagingTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersModelingTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersImagingTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersHyperTreeTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersHybridTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersGeometryTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersGenericTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersGeneralTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersFlowPathsTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersExtractionTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersCoreTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkFiltersAMRTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkDomainsChemistryTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkCommonTransformsTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkCommonSystemTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkCommonMiscTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkCommonMathTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkCommonExecutionModelTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkCommonDataModelTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkCommonCoreTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkCommonComputationalGeometryTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkCommonColorTCL-${VTK_VERSION}.lib
>   ${VTK_LIBRARY_DIRS}/vtkChartsCoreTCL-${VTK_VERSION}.lib)
>
> if (WIN32)
>   target_link_libraries(tclkit tcldde13sx)
>   target_link_libraries(tclkit tclreg12sx)
> endif ()
>
> IF(TARGET vtkRenderingCore)
>         message("RenderingCore FOUND")
>         add_definitions(-DKIT_INCLUDES_VTK_RENDERING)
> endif()
>
> IF(TARGET vtkParallelCore)
>         message("ParallelCore FOUND")
>         add_definitions(-DKIT_INCLUDES_VTK_PARALLEL)
> endif()
>
> IF(TARGET vtkInfovisCore)
>         message("InfovisCore FOUND")
>         add_definitions(-DKIT_INCLUDES_VTK_INFOVIS)
> endif()
>
> IF(TARGET vtkViewsCore)
>         message("ViewsCore FOUND")
>         add_definitions(-DKIT_INCLUDES_VTK_VIEWS)
> endif()
>
> #if (VTK_USE_RENDERING)
> #  target_link_libraries(tclkit ${VTK_LIBRARY_DIRS}/vtkRenderingCoreTCL-${VTK_VERSION}.lib)
> #  target_link_libraries(tclkit ${VTK_LIBRARY_DIRS}/vtkRenderingVolumeTCL-${VTK_VERSION}.lib)
> #  target_link_libraries(tclkit ${VTK_LIBRARY_DIRS}/vtkRenderingAnnotationTCL-${VTK_VERSION}.lib)
> #  target_link_libraries(tclkit ${VTK_LIBRARY_DIRS}/vtkInteractionWidgetsTCL-${VTK_VERSION}.lib)
>  # add_definitions(-DKIT_INCLUDES_VTK_RENDERING)
> #endif ()
>
> #if (VTK_USE_PARALLEL)
> #  target_link_libraries(tclkit ${VTK_LIBRARY_DIRS}/vtkParallelCoreTCL-${VTK_VERSION}.lib)
>  # add_definitions(-DKIT_INCLUDES_VTK_PARALLEL)
> #endif ()
>
> #if(VTK_USE_INFOVIS)
> #  target_link_libraries(tclkit ${VTK_LIBRARY_DIRS}/vtkInfovisCoreTCL-${VTK_VERSION}.lib)
> #  add_definitions(-DKIT_INCLUDES_VTK_INFOVIS)
> #endif ()
>
> #if(VTK_USE_VIEWS)
> #  target_link_libraries(tclkit ${VTK_LIBRARY_DIRS}/vtkViewsCoreTCL-${VTK_VERSION}.lib)
> #  add_definitions(-DKIT_INCLUDES_VTK_VIEWS)
> #endif()
>
> include(${VTK_CMAKE_DIR}/vtkTclTkMacros.cmake)
> VTK_GET_TCL_TK_VERSION ("TCLTK_MAJOR_VERSION" "TCLTK_MINOR_VERSION")
> set (TCLTK_VERSION "${TCLTK_MAJOR_VERSION}${TCLTK_MINOR_VERSION}")
>
> # Compress the binary and append the runtime.
> if (WIN32)
>   set (EXECUTABLE_OUTPUT_DIR "${VTKIT_BINARY_DIR}\\bin\\${CMAKE_CFG_INTDIR}")
>   string(REGEX REPLACE "/" "\\\\" EOD ${EXECUTABLE_OUTPUT_DIR})
>   string(REGEX REPLACE "/" "\\\\" VSD ${VTKIT_SOURCE_DIR})
>   add_custom_command(TARGET tclkit
>        POST_BUILD
>        COMMAND ${UPX_COMMAND}
>        ARGS -9 -f -o ${EOD}\\IWP-upx.exe ${EOD}\\tclkit.exe
>        COMMAND COPY
>        ARGS /B ${EOD}\\IWP-upx.exe+${VSD}\\Runtime\\runtime${TCLTK_VERSION}.kit ${EOD}\\IWP.exe
>        )
> else()
>   add_custom_command(TARGET tclkit
>         POST_BUILD
>         COMMAND ${UPX_COMMAND} -9 -f -o ../bin/IWP-upx ../bin/tclkit
>         ARGS
>         COMMAND cat
>         ARGS ../bin/IWP-upx ${VTKIT_SOURCE_DIR}/runtime/runtime${TCLTK_VERSION}.kit > ../bin/IWP
>         )
> endif()
> -----Ursprüngliche Nachricht-----
> Von: Bill Lorensen [mailto:bill.lorensen at gmail.com]
> Gesendet: Mittwoch, 24. Juni 2015 19:24
> An: Franke, Stephan
> Cc: vtkusers at vtk.org
> Betreff: Re: [vtkusers] vtk 6.1 TCL Wrapping problem
>
> Those libraries no longer exist in vtk 6.x. What does your CMakeLists.txt file look like for your app?
>
>
> On Wed, Jun 24, 2015 at 12:50 PM, Franke, Stephan <Stephan.Franke at inpro.de> wrote:
>> Hello,
>>
>>
>>
>> I try to buid a tclkit with vtk 6.1 and tcl/tk 8.5.18 under windows 8
>> for the x64 architecture.
>>
>> I had done this with vtk 5.8 and tcl/tk 8.5.18 without problems.
>>
>>
>>
>> Now when I compile and link my tclkit against vtk 6.1 I get this
>> unresolved
>> externals:
>>
>>
>>
>> 2>------ Build started: Project: tclkit, Configuration: Release x64
>> 2>------
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> 2>Vtkcommontcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> Vtkfilteringtcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> Vtkgraphicstcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> 2>Vtkiotcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> 2>Vtkimagingtcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> 2>Vtkwidgetstcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> Vtkvolumerenderingtcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> Vtkrenderingtcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> 2>Vtkhybridtcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> Vtkparalleltcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> 2>Vtkinfovistcl_Init
>>
>> 2>kitInit.obj : error LNK2001: unresolved external symbol
>> 2>Vtkviewstcl_Init
>>
>>
>>
>> Did someone know what is missing here?
>>
>> Which vtk library contains these external symbols?
>>
>> Is there something that had changed since vtk 5.8, because with this
>> version I can build my vtk-tclkit.
>>
>> That you very much in advance for your help.
>>
>>
>>
>> Best regards,
>>
>> Stephan Franke
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtkusers mailing list