[Insight-users] [insight-users]itkZeroFluxNeumannPadImageFilterTest got errors when generating executable file.

Mengqiu Tian tianmengqiu at gmail.com
Tue Dec 6 08:22:27 EST 2011


Hi all,

I got errors when I try to compile the
itkZeroFluxNeumannPadImageFilterTest.cxx.
The error information as follows:

Linking CXX executable itkZeroFluxNeumannPadImageFilterTest
gcc/x86_64-suse-linux/4.5/../../../../lib64/crt1.o: In function `_start':
packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:109:
undefined reference to `main'
collect2: ld returned 1 exit status
make[2]: *** [itkZeroFluxNeumannPadImageFilterTest] Error 1
make[1]: *** [CMakeFiles/itkZeroFluxNeumannPadImageFilterTest.dir/all]
Error 2
make: *** [all] Error 2

I just copied the itkZeroFluxNeumannPadImageFilterTest.cxx from
~/ITK/Modules/Filtering/ImageGrid/test and I wrote my own CMakeLists.cxx as
follows:

cmake_minimum_required(VERSION 2.6)

project(itkZeroFluxNeumannPadImageFilterTest)

find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(itkZeroFluxNeumannPadImageFilterTest
itkZeroFluxNeumannPadImageFilterTest.cxx)

if( "${ITK_VERSION_MAJOR}" LESS 4 )
  target_link_libraries(itkZeroFluxNeumannPadImageFilterTest ITKReview
${ITK_LIBRARIES})
else( "${ITK_VERSION_MAJOR}" LESS 4 )
  target_link_libraries(itkZeroFluxNeumannPadImageFilterTest
${ITK_LIBRARIES})
endif( "${ITK_VERSION_MAJOR}" LESS 4 )

Is it a bug or something else?


Regards,
Mengqiu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20111206/f70f3f19/attachment.htm>


More information about the Insight-users mailing list