1 year, 3 months ago.

Round() in online embed compiler, not present?

I am imported an external library and when attempting to compile the Mbed online it throws the following complaint: Error: Identifier "round" is undefined in "ros_lib_melodic/ros/time.h", Line: 64, Col: 24

#include <math.h>

is present.

Is round() present in the compiler that is implemented by Mbed? Does Mbed offer an alternative math function?

I searching it seems that round was excluded by some compilers in the implementation of C++11.

1 Answer

1 year, 3 months ago.

Hi Arlen,

I just tried #include <math.h> and call function round(), it works well, would you confirm it again?

Thanks, Desmond