0

Rosanswers logo

Hi, I would like connect ros node with a Mysql DB but I can't do it. I don't know how use mysql lib client in Ros node because when compiled it appears error as undefined reference to `mysql_get_client_info'. I'm try use cpp cflags export in package.xml but I can't found the correct way to do it.

Thanks in advanced.


Originally posted by Edmodi on ROS Answers with karma: 23 on 2015-02-16

Post score: 0

1 Answers1

0

Rosanswers logo

If this is a catkin package, treat the CMakeLists.txt as you would any ordinary CMake package.

Use find_package(..) and friends to look for the MySQL headers, libraries and other files. Then add those to your include path (include_directories(..)). Make sure to link your node executable to the libraries (target_link_libraries(target_name ${mysql_LIBRARIES})). Make sure to check the names of those Find script variables for yourself, as I did not check them.

I'm try use cpp cflags export in package.xml but I can't found the correct way to do it.

cpp flags is something from rosbuild, which isn't used/supported anymore under catkin.


Originally posted by gvdhoorn with karma: 86574 on 2015-02-16

This answer was ACCEPTED on the original site

Post score: 0

gvdhoorn-rse
  • 39,013
  • 1
  • 1
  • 4