ros-industrial / abb_libegm

A C++ library for interfacing with ABB robot controllers supporting Externally Guided Motion (689-1)
BSD 3-Clause "New" or "Revised" License
96 stars 54 forks source link

Missing definitions of abb::egm::EGMControllerInterface::ControllerMotion::WRITE_TIMEOUT_MS and abb::egm::EGMBaseInterface::WAIT_TIME_MS #67

Closed traversaro closed 4 years ago

traversaro commented 4 years ago

When using a slightly modified version of abb_libegm, under some configurations (Ubuntu 18.04, Debug with Boost 1.69, Debug with standalone Asio) we experienced the following linking errors when linking an executable that linked abb_libegm we experienced the following linking errors:

../../../lib/libidjl_motion_control_egm.so: undefined reference to `abb::egm::EGMControllerInterface::ControllerMotion::WRITE_TIMEOUT_MS'
../../../lib/libidjl_motion_control_egm.so: undefined reference to `abb::egm::EGMBaseInterface::WAIT_TIME_MS'

After some investigations, we found that this was due to the fact that for these two attributes, the definition was missing, so whenever they are passed to functions that takes their inputs by (even const) reference, they will result in a linking error (see https://stackoverflow.com/questions/16957458/static-const-in-c-class-undefined-reference/16957554).

A possible solution is contained in https://github.com/iit-danieli-joint-lab/abb_libegm/commit/4280e662203e4e93ebcb980b116b10847d2faad4 .

dignakov commented 4 years ago

I'm trying to use libegm on Ubuntu 20.04 with ROS Noetic, Boost 1.71, and seeing the same issue. I'm using the fix above for now...