[Insight-users] More issues on DicomImageViewer

Bill Lorensen bill.lorensen at gmail.com
Sat Jun 21 09:12:50 EDT 2008


Have you tried building DicomImageViewer from within
InsightApplications? You should be able to create a binary tree for
InsightApplications, run cmake and then within Visual Studio, just
build DicomImageViewer. This is how our nightly builds work. If this
works for you, then we can try to figure out why your cmakelists.txt
file does not work.

Bill


On Thu, Jun 19, 2008 at 1:00 PM,  <wwhartenby at physics.ucsd.edu> wrote:
> Hi
>  I am using MS Visual. I have tried several CMakeLists.txt (including
> adding TARGET_LINK_LIBRARIES) and I still get the same couple of errors.
> While I built ITKCommon.dll, it appears to be using ITKCommon.lib, which
> is giving me some multiply defined symbols. Here are the errors I am
> getting and the CMakelists.txt. One odd note about CMakeLists.txt; I
> must specify the ".lib" at the end of the ITKLFltkImageViewer in the
> LINK_LIBRARIES, otherwise it looks for an ".obj" file. This doesn't
> happen when I don't include the specific path: it looks for
> ITKFltkImageViewer.lib (of course, without the path information it can't
> find it)
>  Anyway, CMakeLists.txt below: Please note, I have tried with
> TARGET_LINK_LIBRARIES, it still gives me the same error. Errors below
> that. Any additional help is appreciated!
> cmake_minimum_required(VERSION 2.4)
> if(COMMAND cmake_policy)
>  cmake_policy(SET CMP0003 NEW)
> endif (COMMAND cmake_policy)
> PROJECT(DicomImageViewer)
> SET(InsightApplications_SOURCE_DIR
> "N:/Will/CERR/ITK/InsightApplications-3.6.0")
> SET(InsightApplications_BINARY_DIR "N:/Will/CERR/ITK/InsightBinary-3.6.0")
>
>  FIND_PACKAGE(ITK)
>  IF(ITK_FOUND)
>    INCLUDE(${ITK_USE_FILE})
>  ELSE(ITK_FOUND)
>    MESSAGE(FATAL_ERROR
>            "Cannot build InsightApplications without ITK.  Please set
> ITK_DIR.")
>  ENDIF(ITK_FOUND)
>
>  FIND_PACKAGE(FLTK)
>  IF(FLTK_FOUND)
>    INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
>  ENDIF(FLTK_FOUND)
>
>  INCLUDE_DIRECTORIES(
>  ${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer
>  )
>
> LINK_LIBRARIES (
>  ITKBasicFilters
>  ITKIO
>  ${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer/debug/ITKFltkImageViewer.lib
>  ${FLTK_LIBRARIES}
>
> )
>
> ADD_EXECUTABLE( DicomImageViewer DicomImageViewer.cxx )
>
>
>
> ******************ERRORS*******************
>
> Error   1       error LNK2005: "public: __thiscall
> itk::EventObject::EventObject(void)" (??0EventObject at itk@@QAE at XZ) already
> defined in
> ITKFltkImageViewer.lib(fltkImage2DViewerWindow.obj)     ITKCommon.lib
> Error   2       error LNK2005: "public: virtual __thiscall
> itk::EventObject::~EventObject(void)" (??1EventObject at itk@@UAE at XZ) already
> defined in
> ITKFltkImageViewer.lib(fltkImage2DViewerWindow.obj)     ITKCommon.lib
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list