[Insight-users] ITK compilation error

Eduardo Suárez eduardo@dsc.ulpgc.es
Fri, 15 Mar 2002 20:23:40 +0000


Hello all

I'm a newbie to ITK and i am trying to compile it. I could jump over the
first error by patching /home/eduardo/Insight/Utilities/png/Makefile,
but i don't know how to fix the second. What am i doing wrong?

Thanks,
-Eduardo

Second error:

c++ -g -O2 -ftemplate-depth-50 -DFEM_EXPORTS -fPIC
-I/home/eduardo/Insight/Code/Numerics/FEM -I/home/eduardo/Insight
-I/home/eduardo/Insight/Code/Numerics
-I/home/eduardo/Insight/Code/Common
-I/home/eduardo/Insight/Code/Numerics/vxl
-I/home/eduardo/Insight/Code/Numerics/vxl
-I/home/eduardo/Insight/Code/Numerics/vxl/vcl
-I/home/eduardo/Insight/Code/Numerics/vxl/vcl
-I/home/eduardo/Insight/Utilities/png
-I/home/eduardo/Insight/Utilities/zlib   -D_PTHREADS
-DFEM_USE_SMART_POINTERS -c
/home/eduardo/Insight/Code/Numerics/FEM/itkFEMNodeXY.cxx -o
itkFEMNodeXY.o
In file included from
/home/eduardo/Insight/Code/Numerics/FEM/itkFEMNodeXY.cxx:23:
/home/eduardo/Insight/Code/Numerics/FEM/itkFEMNodeXY.h: In member 
   function `virtual itk::SmartPointer<itk::fem::FEMLightObject> 
   itk::fem::NodeXY::Clone() const':
/home/eduardo/Insight/Code/Numerics/FEM/itkFEMNodeXY.h:39: conversion
   from `itk::SmartPointer<itk::fem::NodeXY>' to non-scalar type 
   `itk::SmartPointer<itk::fem::FEMLightObject>' requested
/home/eduardo/Insight/Code/Numerics/FEM/itkFEMNodeXY.cxx: In 
   function `itk::SmartPointer<itk::fem::FEMLightObject> 
   itk::fem::<unnamed>::NewNodeXY()':
/home/eduardo/Insight/Code/Numerics/FEM/itkFEMNodeXY.cxx:134: conversion
   from `itk::SmartPointer<itk::fem::NodeXY>' to non-scalar type 
   `itk::SmartPointer<itk::fem::FEMLightObject>' requested
make[7]: *** [itkFEMNodeXY.o] Error 1
make[6]: *** [default_target] Error 2
make[5]: *** [default_target_FEM] Error 2
make[4]: *** [default_target] Error 2
make[3]: *** [default_target_Numerics] Error 2
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Code] Error 2
make: *** [default_target] Error 2

**********************************************************
First error, just in case:

c++  -rdynamic -shared -g -O2 -ftemplate-depth-50 -o  libitkpng.so 
pngget.o pngrio.o pngwrite.o png.o pngmem.o pngrtran.o pngtrans.o
pngwtran.o pngerror.o pngpread.o pngrutil.o pngvcrd.o pngwutil.o
pnggccrd.o pngread.o pngset.o pngwio.o 
-L/home/eduardo/Insight/Code/Common
-L/home/eduardo/Insight/Code/Numerics/vxl -litkzlib -lpthread -ldl
-Wl,-rpath,/home/eduardo/Insight/Code/Common:/home/eduardo/Insight/Code/Numerics/vxl 
/usr/bin/ld: cannot find -litkzlib
collect2: ld returned 1 exit status
make[5]: *** [libitkpng.so] Error 1
make[4]: *** [default_target] Error 2
make[3]: *** [default_target_png] Error 2
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Utilities] Error 2
make: *** [default_target] Error 2

Patch to /home/eduardo/Insight/Utilities/png/Makefile:

107c107
<         $(itkpng_SRC_OBJS) -L/home/eduardo/Insight/Code/Common
-L/home/eduardo/Insight/Code/Numerics/vxl
-L/home/eduardo/Insight/Utilities/zlib -litkzlib -lpthread -ldl
-Wl,-rpath,/home/eduardo/Insight/Code/Common:/home/eduardo/Insight/Code/Numerics/vxl 
---
>         $(itkpng_SRC_OBJS) -L/home/eduardo/Insight/Code/Common -L/home/eduardo/Insight/Code/Numerics/vxl -litkzlib -lpthread -ldl -Wl,-rpath,/home/eduardo/Insight/Code/Common:/home/eduardo/Insight/Code/Numerics/vxl 

**************************************************