Bug #499

Does not build with C++98

Added by Timo Korthals over 2 years ago. Updated almost 2 years ago.

Status:NewStart date:2017-02-20
Priority:LowDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

The library does not build with the standard settings of gcc, so why not directly setting the standard to c++0x?

/opt/repositories/ICL/ICLCV/src/ICLCV/LensUndistortionCalibrator.cpp:177:70: error: in C++98 ‘s’ must be initialized by constructor, not by ‘{...}’
       CvSize s = { m_data->imageSize.width, m_data->imageSize.height };

History

#1 Updated by Timo Korthals over 2 years ago

So even with c++11 it does not build.
The gnu++11 standard is required!?
Otherwise, the following message occurs (so why not directly setting this in CMakeLists.txt, when it is required anyway):

In file included from /opt/repositories/ICL/ICLGeom/src/ICLGeom/CoplanarPointPoseEstimator.cpp:39:0:
/opt/repositories/ICL/ICLMath/src/ICLMath/PolynomialSolver.h: In function ‘int icl::math::cpoly(int, const xcomplex*, icl::math::xcomplex*)’:
/opt/repositories/ICL/ICLMath/src/ICLMath/PolynomialSolver.h:411:41: error: unable to find numeric literal operator ‘operator""i’
       xcomplex PhiDiff = -0.069756473 + 0.99756405i;
                                         ^
/opt/repositories/ICL/ICLMath/src/ICLMath/PolynomialSolver.h:411:41: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
/opt/repositories/ICL/ICLMath/src/ICLMath/PolynomialSolver.h:412:33: error: unable to find numeric literal operator ‘operator""i’
       xcomplex PhiRand = (1.0 - 1.0i) / sqrt(2.0);
                                 ^

#2 Updated by Alexander Neumann almost 2 years ago

Hi Timo,

I know this issue is quite old but do you still face this issue? Is it still relevant? What is your target platform?

Also available in: Atom PDF