[Insight-users] about itkDICOMImageSeriesTest again...

Bill Lorensen wlorens1 at nycap . rr . com
Fri, 05 Sep 2003 16:07:20 -0400


The program that you are starting with is a test. ather than a main() program, it has a procedure name that is the test name. To build it as a standalone program, replace the test name itkDICOMImageSeriesTest with main.

Bill

At 04:12 PM 9/5/03 +0200, Evelyne Balteau wrote:
>Hi all
> 
>As a lot of insight users during the last weeks, I'm trying to build a 3D image from a series of DICOM files.
>I can run the itkDICOMImageSeriesTest (included in the itkIOTests), but I would like to compile it as a "stand alone" project...
>The only modification I made from the original itkDICOMImageSeriesTest file is that I don't use the itkFilterWatcher...
>Here is the error message I get :
> 
>Compiling...
>itkDICOMImageSeriesTest.cxx
>Linking...
>   Creating library C:\Toolkits\InsightToolkit\Tests\Dicom2\RelWithDebInfo/itkDICOMImageSeriesTest.lib and object C:\Toolkits\InsightToolkit\Tests\Dicom2\RelWithDebInfo/itkDICOMImageSeriesTest.exp
>MSVCRT.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
>C:\Toolkits\InsightToolkit\Tests\Dicom2\RelWithDebInfo/itkDICOMImageSeriesTest.exe : fatal error LNK1120: 1 unresolved externals
>Error executing link.exe.
> 
>Using CMake, I just have linked the itkIO library (TARGET_LINK_LIBRARIES(itkDICOMImageSeriesTest ITKIO) ) , but it is the same if I link all libraries (TARGET_LINK_LIBRARIES(itkDICOMImageSeriesTest ${ITK_LIBRARIES}) ).
>I use the latest ITK tarball (but I still have ITK_1.2.0 compiled on my computer... Could it be a problem, even if the right binaries directory is provided to CMake ?)...
> 
>I'm new in using CMake (so please forgive my ignorance!!)... 
>Could it be that I make something wrong writing the CMakeLists.txt ? 
>My CMakeLists is just based on the "Hello World" example...
> 
>Hope all this above is enough to find what is wrong...
> 
>Thanks a lot !
> 
>Evelyne
>