ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This is probably not complete:
First, add <rosdep name="libmysqlclient-dev"/>
to your manifest.xml
.
Reference the file in your C++ sources using: #include <mysql/mysql.h>
Add something like this to your CmakeLists.txt
:
find_package(MySql REQUIRED)
include_directories(${MYSQL_INCLUDE_DIRS})
add_definitions(${MYSQL_DEFINITIONS})
Please post corrections if this is not quite right.
2 | add export comment |
This is probably not complete:
First, add <rosdep name="libmysqlclient-dev"/>
to your manifest.xml
.
Reference the file in your C++ sources using: #include <mysql/mysql.h>
Add something like this to your CmakeLists.txt
:
find_package(MySql REQUIRED)
include_directories(${MYSQL_INCLUDE_DIRS})
add_definitions(${MYSQL_DEFINITIONS})
Please post corrections if this is not quite right.UPDATE: a library that depends on MySQL probably needs to export some link flags in its manifest.xml
like this:
<export>
<cpp lflags="-lmysqlclient"/>
</export>
Normally, that would be done using pkg-config
, but I don't see a .pc
file for MySQL on Ubuntu Oneiric. You may have to figure out the correct lflags
experimentally.
3 | make answer less uncertain |
This is probably may not be complete:
First, add <rosdep name="libmysqlclient-dev"/>
to your manifest.xml
.
Reference the file in your C++ sources using: #include <mysql/mysql.h>
Add something like this to your CmakeLists.txt
:
find_package(MySql REQUIRED)
include_directories(${MYSQL_INCLUDE_DIRS})
add_definitions(${MYSQL_DEFINITIONS})
UPDATE: a library that depends on MySQL probably needs to export some link flags in its manifest.xml
like this:
<export>
<cpp lflags="-lmysqlclient"/>
</export>
Normally, that would be done using pkg-config
, but I don't see a .pc
file for MySQL on Ubuntu Oneiric. You may have to figure out the correct lflags
experimentally.