preprocessor errors of catkin_make
Dear ALL
Recently I want to transplant an old version code to Ubuntu 14.04 with ROS Indigo. But when I catkin_make the old code, there are many preprocessor errors like:
In file included from /usr/include/math.h:32:0,
from /usr/include/c++/4.8/cmath:44,
from /usr/include/c++/4.8/complex:44,
from /usr/include/eigen3/Eigen/Core:28,
from /usr/include/eigen3/Eigen/Dense:1,
from /home/cheng/catkin_ws/src/pioneer_neo/neo_3dlabelling/src/include/generic_utils.h:4,
from /home/cheng/catkin_ws/src/pioneer_neo/neo_3dlabelling/./src/include/features.h:20,
from /usr/include/x86_64-linux-gnu/c++/4.8/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h:426,
from /usr/include/c++/4.8/cstddef:41,
from /usr/include/boost/config/select_stdlib_config.hpp:18,
from /usr/include/boost/config.hpp:40,
from /usr/include/boost/cstdint.hpp:36,
from /usr/include/pcl-1.7/pcl/pcl_macros.h:41,
from /usr/include/pcl-1.7/pcl/point_types.h:42,
from /home/cheng/catkin_ws/src/pioneer_neo/neo_3dlabelling/src/include/point_types.h:19,
from /home/cheng/catkin_ws/src/pioneer_neo/neo_3dlabelling/src/include/global_define.h:19,
from /home/cheng/catkin_ws/src/pioneer_neo/neo_3dlabelling/src/graeae.cpp:16:
/usr/include/x86_64-linux-gnu/bits/huge_val.h:26:18: error: missing binary operator before token "("
#if __GNUC_PREREQ(3,3)
^
/usr/include/x86_64-linux-gnu/bits/huge_val.h:28:20: error: missing binary operator before token "("
#elif __GNUC_PREREQ(2,96)
I am just a new beginner and I google many websites. But I still did not find the solution. Could anyone give me some suggestions? Thank you so much!
Henry
What previous ROS version did it work with?
In Ubuntu12.04 with groovy, it can works well. It is compiled using rosmake. But in Ubuntu 14.04 with indigo, it is compiled using catkin_make. The preprocessor errors occurred.
Did you convert your package from rosmake to catkin_make?
Have you tried building it with rosmake, as before?
yep, I converted it from rosmake to catkin_make through modifying CMakeLists.txt. It can be built through rosmake in groove in Ubuntu12.04
This looks to be just a C++ error where
__GNUC_PREREQ
is not yet defined: http://stackoverflow.com/questions/30... You might just try including#include <cstring>
first thing in the files which fail to compile.Many thanks for everybody's help. I built it using rosmake instead of catkin_make in Indigo in Ubuntu 14.04. The preprocessor errors did not occur again. Why using catkin_make, the preprocessor errors occurred. It really confuses me.
That is a mystery. I'm not aware of any difference in the two that could manifest like this.