[Insight-users] ITK/Eclipse configuration problem

Fleming, Matthew mfleming at mcw.edu
Fri May 18 08:49:27 EDT 2007


Folks,

I would like to use Eclipse for ITK programming. (I am new to both, so if the following has an obvious solution that I have missed, please excuse me.) I installed Eclipse with CDT and the CMake plug-in, as well as ITK, on Ubuntu Linux. I then used the example from InsightToolkit-3.2.0/Examples/Installation, building the Makefile with CMake and importing the project into Eclipse as a "Standard C++ Makefile Project". In this, I was basically following the instructions from http://www.cmake.org/Wiki/CMake_Editors_Support.  Everything worked as advertised, except for one problem; I was able to use CMake from within Eclipse to regenerate the Makefile and clean, build, and run the HelloWorld application. The problem is that debugging doesn't quite work. When I start the debug, execution stops at the beginning of the program, and when I then press the "Resume" button, it runs to completion, even if breakpoints are set. Presumably this problem has a simple solution, but I've been looking at it for awhile now, and can't determine what it is. Any suggestions would be much appreciated.

I've included the contents of my CmakeLists.txt below.

Thanks,

Matthew Fleming

# This project is designed to be built outside the Insight source tree.
PROJECT(HelloWorld)

# Find ITK.
FIND_PACKAGE(ITK REQUIRED)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ENDIF(ITK_FOUND)

IF(CMAKE_COMPILER_IS_GNUCC)
  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCXX)
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

SET(CMAKE_VERBOSE_MAKEFILE ON)

SET(CMAKE_BUILD_TYPE "Debug")


ADD_EXECUTABLE(HelloWorld HelloWorld.cxx )

TARGET_LINK_LIBRARIES(HelloWorld ITKCommon)


More information about the Insight-users mailing list