[ITK-dev] Linux c++11 build issue v4.8.2
David Burns
david.mo.burns at gmail.com
Tue Dec 15 15:10:38 EST 2015
Dear Insight Developers
I have compiled v4.8.2 on Ubuntu 14.04 successfully (g++ 4.8), however,
I get compiler errors when building my own ITK applications with the
following cmake flag
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11"
I can compile ITK applications when not using this flag.
I have tried using -fpermissive when building my application. I have
also tried compiling ITK using -std=c++11 -fpermissive, individually and
in combination. I always get the same errors.
Any suggestions would be welcome. Thanks
David
Compiler errors
/usr/local/include/ITK-4.8/vnl/vnl_numeric_traits.h:387:60: warning:
'constexpr' needed for in-class initialization of static data member
'const float vnl_numeric_traits<float>::zero' of non-integral type
[-fpermissive]
static const float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F);
^
/usr/local/include/ITK-4.8/vcl_config_compiler.h:152:48: note: in
definition of macro 'VCL_STATIC_CONST_INIT_FLOAT_DECL'
# define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
^
/usr/local/include/ITK-4.8/vnl/vnl_numeric_traits.h:389:59: warning:
'constexpr' needed for in-class initialization of static data member
'const float vnl_numeric_traits<float>::one' of non-integral type
[-fpermissive]
static const float one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0F);
^
/usr/local/include/ITK-4.8/vcl_config_compiler.h:152:48: note: in
definition of macro 'VCL_STATIC_CONST_INIT_FLOAT_DECL'
# define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
^
/usr/local/include/ITK-4.8/vnl/vnl_numeric_traits.h:391:62: warning:
'constexpr' needed for in-class initialization of static data member
'const float vnl_numeric_traits<float>::maxval' of non-integral type
[-fpermissive]
static const float maxval
VCL_STATIC_CONST_INIT_FLOAT_DECL(3.40282346638528860e+38F);
^
/usr/local/include/ITK-4.8/vcl_config_compiler.h:152:48: note: in
definition of macro 'VCL_STATIC_CONST_INIT_FLOAT_DECL'
# define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
^
/usr/local/include/ITK-4.8/vnl/vnl_numeric_traits.h:410:61: warning:
'constexpr' needed for in-class initialization of static data member
'const double vnl_numeric_traits<double>::zero' of non-integral type
[-fpermissive]
static const double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0);
^
/usr/local/include/ITK-4.8/vcl_config_compiler.h:152:48: note: in
definition of macro 'VCL_STATIC_CONST_INIT_FLOAT_DECL'
# define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
^
/usr/local/include/ITK-4.8/vnl/vnl_numeric_traits.h:412:60: warning:
'constexpr' needed for in-class initialization of static data member
'const double vnl_numeric_traits<double>::one' of non-integral type
[-fpermissive]
static const double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0);
^
/usr/local/include/ITK-4.8/vcl_config_compiler.h:152:48: note: in
definition of macro 'VCL_STATIC_CONST_INIT_FLOAT_DECL'
# define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
^
/usr/local/include/ITK-4.8/vnl/vnl_numeric_traits.h:414:63: warning:
'constexpr' needed for in-class initialization of static data member
'const double vnl_numeric_traits<double>::maxval' of non-integral type
[-fpermissive]
static const double maxval
VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308);
^
/usr/local/include/ITK-4.8/vcl_config_compiler.h:152:48: note: in
definition of macro 'VCL_STATIC_CONST_INIT_FLOAT_DECL'
# define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
^
/usr/local/include/ITK-4.8/vnl/vnl_numeric_traits.h:433:66: warning:
'constexpr' needed for in-class initialization of static data member
'const long double vnl_numeric_traits<long double>::zero' of
non-integral type [-fpermissive]
static const long double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0);
^
/usr/local/include/ITK-4.8/vcl_config_compiler.h:152:48: note: in
definition of macro 'VCL_STATIC_CONST_INIT_FLOAT_DECL'
# define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
^
/usr/local/include/ITK-4.8/vnl/vnl_numeric_traits.h:435:65: warning:
'constexpr' needed for in-class initialization of static data member
'const long double vnl_numeric_traits<long double>::one' of non-integral
type [-fpermissive]
static const long double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0);
^
/usr/local/include/ITK-4.8/vcl_config_compiler.h:152:48: note: in
definition of macro 'VCL_STATIC_CONST_INIT_FLOAT_DECL'
# define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
^
/usr/local/include/ITK-4.8/vnl/vnl_numeric_traits.h:437:68: warning:
'constexpr' needed for in-class initialization of static data member
'const long double vnl_numeric_traits<long double>::maxval' of
non-integral type [-fpermissive]
static const long double maxval
VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308);
^
/usr/local/include/ITK-4.8/vcl_config_compiler.h:152:48: note: in
definition of macro 'VCL_STATIC_CONST_INIT_FLOAT_DECL'
# define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
^
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-developers/attachments/20151215/0995d8d0/attachment.html>
More information about the Insight-developers
mailing list