[Insight-users] Re: Syntax error on including itkNonUniformBSpline.h!

Amit Ramesh Amit.Ramesh at cshs.org
Tue Oct 10 19:26:46 EDT 2006


	gcc 4.0 gave a more meaningful compiler error. The required  
definition for itk::ObjectFactory (itkObjectFactory.h) is missing in  
itkNonUniformBSpline.h (which is probably why it is still under  
development!). Including itkObjectFactory.h before  
itkNonUniformBSpline.h solves the problem.

- Amit


On Fri Oct 6 16:26:12 EDT 2006, Amit Ramesh wrote:

>
> Hi,
>
>      I have been successfully using ITK for the past 6 months on mac
> and windows, but only recently did I have the need to make use of the
> b-spline fitting class. I am able to successfully use it on windows
> and get a good fit for my points. However, my code does not compile
> on Mac OS 10.4. First I had assumed that it had something to do with
> my usage, but now realize that merely including the header file
> causes compilation errors! Following is a minimal code that causes
> the errors, and the list of errors generated. Any ideas? Solutions?
>
> OS:    Mac OS 10.4
> gcc:   3.3
> ITK:   2.8
>
>
> test.cpp:
> -----------
>
> #include <itkNonUniformBSpline.h>
>
> int
> main()
> {
>      return 0;
> }
>
> gcc output:
> ---------------
>
> In file included from /usr/local/include/InsightToolkit/Common/
> itkPoint.h:22,
>                   from /usr/local/include/InsightToolkit/Common/
> itkNonUniformBSpline.h:28,
>                   from test.cpp:1:
> /usr/local/include/InsightToolkit/Common/itkNumericTraits.h:410:
> warning: use of `long double' type; its size may change in a future
> release
> /usr/local/include/InsightToolkit/Common/itkNumericTraits.h:410:
> warning: (Long  double usage is reported only once for each file.
> /usr/local/include/InsightToolkit/Common/itkNumericTraits.h:410:
> warning: To  disable this warning, use -Wno-long-double.)
> In file included from test.cpp:1:
> 	/usr/local/include/InsightToolkit/Common/itkNonUniformBSpline.h:
> 		In static member function `static
> itk::SmartPointer<itk::NonUniformBSpline<TDimension> >
> itk::NonUniformBSpline<TDimension>::New()':
> /usr/local/include/InsightToolkit/Common/itkNonUniformBSpline.h:71:
> error: parse error before `;' token
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20061010/3a26fa9f/attachment-0001.htm


More information about the Insight-users mailing list