[Insight-users] Compile problems using Cygwin

Luis Ibanez luis.ibanez at kitware.com
Sat Jul 10 23:03:36 EDT 2004


Hi Martin,

The Examples are not designed to be configured
from each independent subdirectory. Instead, they
get configured from the top directory along with ITK.

If you want to separate the examples from the source
tree of ITK, you must add some lines to the CMakeLists.txt
file.  This is explained in detail in the tutorial sessions:

     http://www.itk.org/HTML/Tutorials.htm

in particular in

http://www.itk.org/CourseWare/Training/GettingStarted-I.pdf

and in the Installation chapted of the SoftwareGuide

      http://www.itk.org/ItkSoftwareGuide.pdf


Please look at the "Hello World" example,


You *should not* edit the generated Makefiles. Any deficiency
in a Makefile program is an indication that something is missing
in the associated CMakeLists.txt file.



    Regards,



        Luis


-------------------------
Martin Magnusson wrote:

> Hi all.
> 
> I recently installed ITK using CMake 1.8.3, and I'm using Cygwin under 
> Windows 2000. Installation was trouble less, but I can't compile any of 
> the example programs.
> 
> When I run make for Examples/DataRepresentation/Image, for example, I 
> get the following error message:
> 
> $source/ITK/Examples/DataRepresentation/Image> make
> cmake.depends is up-to-date
> Building executable 
> /home/martin/source/libs/ITK/InsightToolkit-1.6.0/Examples/DataRepresentation/Image/Image1.exe... 
> 
> /usr/local/lib/InsightToolkit/libITKCommon.a(itkWin32OutputWindow.o)(.text+0x7db):itkWin32OutputWindow.cxx: 
> undefined reference to `_GetStockObject at 4'
> collect2: ld returned 1 exit status
> make[1]: *** 
> [/home/martin/source/libs/ITK/InsightToolkit-1.6.0/Examples/DataRepresentation/Image/Image1.exe] 
> Error 1
> make: *** [default_target] Error 2
> 
> I had to edit the Makefile to include "-L/usr/local/lib/InsightToolkit" 
> on the command line. Before I did that gcc complained that it couldnt 
> find -lITKCommon.
> 
> Has anyone else run into this? Any suggestions?
> 
> Thanks,
> martin
> _______________________________________________
> 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