coin-or/Ipopt

error "don't have header file for stddef"

kashifzr opened this issue · 2 comments

Ipopt 3.14.4
OS = Noetic

Unable to solve this issue, when i check through different form they said its bug and remove on 3.11 onward release but my is 3.14.4 I am unable to remove this issue

In file included from /usr/include/coin/IpJournalist.hpp:15,
from /usr/include/coin/IpIpoptApplication.hpp:26,
from /home/kkj/home/catkin_ws_mobr/src/mpc_ros/mpc_ros/include/cppad/ipopt/solve_callback.hpp:16,
from /home/kkj/home/catkin_ws_mobr/src/mpc_ros/mpc_ros/include/cppad/ipopt/solve.hpp:367,
from /home/kkj/home/catkin_ws_mobr/src/mpc_ros/mpc_ros/src/navMPC.cpp:19:
/usr/include/coin/IpSmartPtr.hpp:18:4: error: #error "don't have header file for stddef"
18 | # error "don't have header file for stddef"
| ^~~~~
In file included from /usr/include/coin/IpJournalist.hpp:15,
from /usr/include/coin/IpIpoptApplication.hpp:26,
from /home/kkj/home/catkin_ws_mobr/src/mpc_ros/mpc_ros/include/cppad/ipopt/solve_callback.hpp:16,
from /home/kkj/home/catkin_ws_mobr/src/mpc_ros/mpc_ros/include/cppad/ipopt/solve.hpp:367,
from /home/kkj/home/catkin_ws_mobr/src/mpc_ros/mpc_ros/src/trackRefTraj.cpp:20:
/usr/include/coin/IpSmartPtr.hpp:18:4: error: #error "don't have header file for stddef"
18 | # error "don't have header file for stddef"
| ^~~~~
In file included from /usr/include/coin/IpJournalist.hpp:15,
from /usr/include/coin/IpIpoptApplication.hpp:26,
from /home/kkj/home/catkin_ws_mobr/src/mpc_ros/mpc_ros/include/cppad/ipopt/solve_callback.hpp:16,
from /home/kkj/home/catkin_ws_mobr/src/mpc_ros/mpc_ros/include/cppad/ipopt/solve.hpp:367,
from /home/kkj/home/catkin_ws_mobr/src/mpc_ros/mpc_ros/src/MPC.cpp:21:
/usr/include/coin/IpSmartPtr.hpp:18:4: error: #error "don't have header file for stddef"
18 | # error "don't have header file for stddef"

May i ask how did you solve it?

They probably realized that /usr/include/coin belongs to some very old Ipopt installation (Ipopt < 3.13). Current Ipopt headers were probably in /usr/include/coin-or.