[Insight-users] Errors compiling applications using gcc-3.3.3

Wagner Sales wsalles2003@yahoo.com.br
Wed May 12 15:55:50 EDT 2004


This is a multi-part message in MIME format.
--------------090308090706010109040609
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi all,

I was tryed to compile the same code in SuSE 9.0/gcc-3.3.1 and in SuSE 
9.1/gcc-3.3.3.
The same errors ( in attachment ) are showed, but in first case I can 
obtain success.
I think somegthing wrong with compiler options. Like I can't use cmake 
in this project ( instead, I'm using automake, because I need a lot of 
more things that's are fully supported on automake. e.g: kdelibs ) I 
need help with compiler. I'll put in my automake project painless.
May be help the includes and typedefs:

#include <string.h>
#include <stdio.h>

#include <itkImage.h>
#include <itkImageFileReader.h>
#include <itkDICOMImageIO2.h>
#include <itkDICOMImageIO2Factory.h>
#include <itkImageRegionIteratorWithIndex.h>
#include <itkRescaleIntensityImageFilter.h>

#include <qimage.h>
#include <iostream>


typedef itk::Image<signed short, 2 > ImageDicomType;
typedef itk::Image<unsigned char, 2 > ImageType;
typedef ImageType::RegionType RegionType;
typedef RegionType::SizeType SizeType;
typedef itk::ImageRegionIteratorWithIndex<ImageType> IteratorType;
typedef itk::RescaleIntensityImageFilter< ImageDicomType, ImageType > 
FilterType;



Thks

Wagner


--------------090308090706010109040609
Content-Type: text/plain;
 name="errorComp.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="errorComp.txt"

if /bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/include/InsightToolkit/BasicFilters -I/usr/include/InsightToolkit/IO -I/usr/include/InsightToolkit/Utilities/vxl/vcl -I/usr/include/InsightToolkit/Utilities/vxl/core -I/usr/include/InsightToolkit/Utilities/vxl -I/usr/include/InsightToolkit/Common -I/usr/include/InsightToolkit -I/usr/include/vtk -I/opt/kde3/include -I/usr/lib/qt3/include -I/usr/X11R6/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-check-new  -MT loadImage.lo -MD -MP -MF ".deps/loadImage.Tpo" \
  -c -o loadImage.lo `test -f 'loadImage.cpp' || echo './'`loadImage.cpp; \
then mv -f ".deps/loadImage.Tpo" ".deps/loadImage.Plo"; \
else rm -f ".deps/loadImage.Tpo"; exit 1; \
fi
In file included from /usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_c_vector.h:25,
                 from /usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_vector.h:19,
                 from /usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_vector_ref.h:20,
                 from /usr/include/InsightToolkit/Common/itkVector.h:21,
                 from /usr/include/InsightToolkit/Common/itkPoint.h:20,
                 from /usr/include/InsightToolkit/Common/itkImageBase.h:29,
                 from /usr/include/InsightToolkit/Common/itkImage.h:20,
                 from loadImage.h:19,
                 from loadImage.cpp:13:
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_numeric_traits.h:306: error: ISO
   C++ forbids initialization of member constant `zero' of non-integral type `
   const float'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_numeric_traits.h:308: error: ISO
   C++ forbids initialization of member constant `one' of non-integral type `
   const float'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_numeric_traits.h:310: error: ISO
   C++ forbids initialization of member constant `maxval' of non-integral type
   `const float'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_numeric_traits.h:329: error: ISO
   C++ forbids initialization of member constant `zero' of non-integral type `
   const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_numeric_traits.h:331: error: ISO
   C++ forbids initialization of member constant `one' of non-integral type `
   const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_numeric_traits.h:333: error: ISO
   C++ forbids initialization of member constant `maxval' of non-integral type
   `const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_numeric_traits.h:352: error: ISO
   C++ forbids initialization of member constant `zero' of non-integral type `
   const long double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_numeric_traits.h:354: error: ISO
   C++ forbids initialization of member constant `one' of non-integral type `
   const long double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_numeric_traits.h:356: error: ISO
   C++ forbids initialization of member constant `maxval' of non-integral type
   `const long double'
In file included from /usr/include/InsightToolkit/Common/itkVector.txx:22,
                 from /usr/include/InsightToolkit/Common/itkVector.h:196,
                 from /usr/include/InsightToolkit/Common/itkPoint.h:20,
                 from /usr/include/InsightToolkit/Common/itkImageBase.h:29,
                 from /usr/include/InsightToolkit/Common/itkImage.h:20,
                 from loadImage.h:19,
                 from loadImage.cpp:13:
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:55: error: ISO
   C++ forbids initialization of member constant `e' of non-integral type `
   const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:56: error: ISO
   C++ forbids initialization of member constant `log2e' of non-integral type `
   const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:57: error: ISO
   C++ forbids initialization of member constant `log10e' of non-integral type
   `const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:58: error: ISO
   C++ forbids initialization of member constant `ln2' of non-integral type `
   const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:59: error: ISO
   C++ forbids initialization of member constant `ln10' of non-integral type `
   const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:60: error: ISO
   C++ forbids initialization of member constant `pi' of non-integral type `
   const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:61: error: ISO
   C++ forbids initialization of member constant `pi_over_2' of non-integral
   type `const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:62: error: ISO
   C++ forbids initialization of member constant `pi_over_4' of non-integral
   type `const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:63: error: ISO
   C++ forbids initialization of member constant `one_over_pi' of non-integral
   type `const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:64: error: ISO
   C++ forbids initialization of member constant `two_over_pi' of non-integral
   type `const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:65: error: ISO
   C++ forbids initialization of member constant `two_over_sqrtpi' of
   non-integral type `const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:66: error: ISO
   C++ forbids initialization of member constant `sqrt2' of non-integral type `
   const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:67: error: ISO
   C++ forbids initialization of member constant `sqrt1_2' of non-integral type
   `const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:70: error: ISO
   C++ forbids initialization of member constant `eps' of non-integral type `
   const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:71: error: ISO
   C++ forbids initialization of member constant `sqrteps' of non-integral type
   `const double'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:73: error: ISO
   C++ forbids initialization of member constant `float_eps' of non-integral
   type `const float'
/usr/include/InsightToolkit/Utilities/vxl/core/vnl/vnl_math.h:74: error: ISO
   C++ forbids initialization of member constant `float_sqrteps' of
   non-integral type `const float'
loadImage.cpp: In constructor `loadImage::loadImage(const char*)':
loadImage.cpp:41: error: invalid conversion from `const char*' to `char*'
loadImage.cpp:48: error: declaration does not declare anything
/usr/include/InsightToolkit/IO/itkImageFileReader.txx: In member function `void
   itk::ImageFileReader<TOutputImage,
   ConvertPixelTraits>::EnlargeOutputRequestedRegion(itk::DataObject*) [with
   TOutputImage = ImageDicomType, ConvertPixelTraits =
   itk::DefaultConvertPixelTraits<short int>]':
/usr/include/InsightToolkit/Common/itkImageConstIteratorWithIndex.h:252:   instantiated from here
/usr/include/InsightToolkit/IO/itkImageFileReader.txx:174: warning: deprecated
   conversion from string constant to `char*'
/usr/include/InsightToolkit/IO/itkImageFileReader.txx: In member function `void
   itk::ImageFileReader<TOutputImage,
   ConvertPixelTraits>::GenerateOutputInformation() [with TOutputImage =
   ImageDicomType, ConvertPixelTraits = itk::DefaultConvertPixelTraits<short
   int>]':
/usr/include/InsightToolkit/Common/itkImageConstIteratorWithIndex.h:252:   instantiated from here
/usr/include/InsightToolkit/IO/itkImageFileReader.txx:91: warning: deprecated
   conversion from string constant to `char*'
/usr/include/InsightToolkit/Common/itkImageConstIteratorWithIndex.h:252:   instantiated from here
/usr/include/InsightToolkit/IO/itkImageFileReader.txx:101: warning: deprecated
   conversion from string constant to `char*'
/usr/include/InsightToolkit/IO/itkImageFileReader.txx: In member function `void
   itk::ImageFileReader<TOutputImage,
   ConvertPixelTraits>::DoConvertBuffer(void*, long unsigned int) [with
   TOutputImage = ImageDicomType, ConvertPixelTraits =
   itk::DefaultConvertPixelTraits<short int>]':
/usr/include/InsightToolkit/IO/itkImageFileReader.txx:262:   instantiated from `void itk::ImageFileReader<TOutputImage, ConvertPixelTraits>::GenerateData() [with TOutputImage = ImageDicomType, ConvertPixelTraits = itk::DefaultConvertPixelTraits<short int>]'
/usr/include/InsightToolkit/Common/itkImageConstIteratorWithIndex.h:252:   instantiated from here
/usr/include/InsightToolkit/IO/itkImageFileReader.txx:313: warning: deprecated
   conversion from string constant to `char*'
make: ** [loadImage.lo] Erro 1


--------------090308090706010109040609--



More information about the Insight-users mailing list