[Insight-developers] compilation error when compiled with gnu++0x flag
Arnaud Gelas
arnaudgelas at gmail.com
Wed May 9 08:00:08 EDT 2012
Hi all,
When doing cmake -DCMAKE_CXX_FLAGS=-std=gnu++0x /path/to/ITK && make
-j8, I get compilation errors in vnl_math (see below).
gcc version: 4.6.3
cmake version: 2.8.7
What would be the best way to fix these errors?
Thanks,
Arnaud
---
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:87:27:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘e’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:88:31:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘log2e’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:89:32:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘log10e’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:90:29:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘ln2’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:91:30:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘ln10’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:92:28:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘pi’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:93:35:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘pi_over_2’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:94:35:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘pi_over_4’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:95:37:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘one_over_pi’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:96:37:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘two_over_pi’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:97:41:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘two_over_sqrtpi’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:98:42:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘one_over_sqrt2pi’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:99:31:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘sqrt2’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:100:33:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘sqrt1_2’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:101:31:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘euler’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:104:29:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘eps’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:105:33:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘sqrteps’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:107:34:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘float_eps’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:108:38:
error: ‘constexpr’ needed for in-class initialization of static data
member ‘float_sqrteps’ of non-integral type
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:84:24:
error: ‘const double vnl_math::e’ is not a static member of ‘class vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:84:14:
error: uninitialized const ‘vnl_math::e’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:85:24:
error: ‘const double vnl_math::log2e’ is not a static member of ‘class
vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:85:14:
error: uninitialized const ‘vnl_math::log2e’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:86:24:
error: ‘const double vnl_math::log10e’ is not a static member of ‘class
vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:86:14:
error: uninitialized const ‘vnl_math::log10e’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:87:24:
error: ‘const double vnl_math::ln2’ is not a static member of ‘class
vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:87:14:
error: uninitialized const ‘vnl_math::ln2’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:88:24:
error: ‘const double vnl_math::ln10’ is not a static member of ‘class
vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:88:14:
error: uninitialized const ‘vnl_math::ln10’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:89:24:
error: ‘const double vnl_math::pi’ is not a static member of ‘class
vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:89:14:
error: uninitialized const ‘vnl_math::pi’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:90:24:
error: ‘const double vnl_math::pi_over_2’ is not a static member of
‘class vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:90:14:
error: uninitialized const ‘vnl_math::pi_over_2’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:91:24:
error: ‘const double vnl_math::pi_over_4’ is not a static member of
‘class vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:91:14:
error: uninitialized const ‘vnl_math::pi_over_4’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:92:24:
error: ‘const double vnl_math::one_over_pi’ is not a static member of
‘class vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:92:14:
error: uninitialized const ‘vnl_math::one_over_pi’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:93:24:
error: ‘const double vnl_math::two_over_pi’ is not a static member of
‘class vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:93:14:
error: uninitialized const ‘vnl_math::two_over_pi’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:94:24:
error: ‘const double vnl_math::two_over_sqrtpi’ is not a static member
of ‘class vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:94:14:
error: uninitialized const ‘vnl_math::two_over_sqrtpi’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:95:24:
error: ‘const double vnl_math::one_over_sqrt2pi’ is not a static member
of ‘class vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:95:14:
error: uninitialized const ‘vnl_math::one_over_sqrt2pi’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:96:24:
error: ‘const double vnl_math::sqrt2’ is not a static member of ‘class
vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:96:14:
error: uninitialized const ‘vnl_math::sqrt2’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:97:24:
error: ‘const double vnl_math::sqrt1_2’ is not a static member of ‘class
vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:97:14:
error: uninitialized const ‘vnl_math::sqrt1_2’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:98:24:
error: ‘const double vnl_math::euler’ is not a static member of ‘class
vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:98:14:
error: uninitialized const ‘vnl_math::euler’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:101:24:
error: ‘const double vnl_math::eps’ is not a static member of ‘class
vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:101:14:
error: uninitialized const ‘vnl_math::eps’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:102:24:
error: ‘const double vnl_math::sqrteps’ is not a static member of ‘class
vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:102:14:
error: uninitialized const ‘vnl_math::sqrteps’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:105:23:
error: ‘const float vnl_math::float_eps’ is not a static member of
‘class vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:105:13:
error: uninitialized const ‘vnl_math::float_eps’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:106:23:
error: ‘const float vnl_math::float_sqrteps’ is not a static member of
‘class vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:106:13:
error: uninitialized const ‘vnl_math::float_sqrteps’ [-fpermissive]
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:
In static member function ‘static double vnl_math::angle_0_to_2pi(double)’:
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:291:16:
error: ‘pi’ is not a member of ‘vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:292:28:
error: ‘pi’ is not a member of ‘vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:294:12:
error: ‘pi’ is not a member of ‘vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:294:47:
error: ‘pi’ is not a member of ‘vnl_math’
/home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.cxx:304:21:
error: ‘pi’ is not a member of ‘vnl_math’
make[2]: ***
[Modules/ThirdParty/VNL/src/vxl/core/vnl/CMakeFiles/itkvnl.dir/vnl_math.cxx.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
More information about the Insight-developers
mailing list