[vtkusers] multiple definition of...
verena kinder
verena.kinder at web.de
Sat Apr 16 18:25:33 EDT 2005
Hello!
Can anyone knows why this error occures:
multiple definition of myvariable
I have a folder VTK_CODE with subdirs:
Common: contains common.cxx where global variables are defined. This variables are
responible for the errors
CLASS_I: contains inter.cxx which includes inter.h and common.cxx
Header: contains inter.h
MAIN: contains Medical_my_6.cxx which naturally includes common.cxx and inter.h
I use the following cmake files for compiling:
__________________________________________________________
In the VTK_CODE folder:
PROJECT (VISUALIZATION)
SET (VISUALIZATION_CAN_BUILD 1)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
IF (VISUALIZATION_CAN_BUILD)
SUBDIRS (
Common
Header
CLASS_I
)
INCLUDE_DIRECTORIES(/home/praktikum/programme/komplett/MR/Visualization/VTK_CODE/Common)
INCLUDE_DIRECTORIES (/home/praktikum/programme/komplett/MR/Visualization/VTK_CODE/Header)
INCLUDE_DIRECTORIES (/home/praktikum/programme/komplett/MR/Visualization/VTK_CODE/CLASS_I)
OPTION(BUILD_MAIN "Build examples." ON)
IF (BUILD_MAIN)
SUBDIRS(MAIN)
ENDIF (BUILD_MAIN)
ENDIF (VISUALIZATION_CAN_BUILD)
_______________________________________________
In the Common folder:
ADD_LIBRARY(common common.cxx )
_____________________________________________
In the CLASS_I folder:
ADD_LIBRARY(interaction vtkInter.cxx )
TARGET_LINK_LIBRARIES(interaction common )
____________________________________________
In the MAIN folder:
ADD_EXECUTABLE(Medical_my_6 Medical_my_6.cxx)
TARGET_LINK_LIBRARIES(Medical_my_6 interaction vtkRendering vtkIO)
____________________________________________
Thanks
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201
More information about the vtkusers
mailing list