ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
compile your i2c library similar to
add_library(mylib src/mylib.cpp)
then compile your node then link your library to your node
add_executable(mynode src/mynode.cpp)
target_link_libraries(mynode mylib)
hope this helps
2 | No.2 Revision |
compile your i2c library similar to
add_library(mylib src/mylib.cpp)
then compile your node then link your library to your node
add_executable(mynode src/mynode.cpp)
target_link_libraries(mynode mylib)
If it is an external library
find_package( PkgConfig REQUIRED) pkg_check_modules( mylib REQUIRED ulapi )
then link the library to your node
hope this helps
3 | No.3 Revision |
compile your i2c library similar to
add_library(mylib src/mylib.cpp)
then compile your node then link your library to your node
add_executable(mynode src/mynode.cpp)
target_link_libraries(mynode mylib)
If it is an external library
find_package( PkgConfig REQUIRED)
pkg_check_modules( mylib REQUIRED ulapi then link the library to your node
add_executable(mynode src/mynode.cpp)
target_link_libraries( my_exec ${ulapi_LIBRARIES} )
hope this helps
4 | No.4 Revision |
compile your i2c library similar to
add_library(mylib src/mylib.cpp)
then compile your node then link your library to your node
add_executable(mynode src/mynode.cpp)
target_link_libraries(mynode mylib)
If it is an external library
find_package( PkgConfig REQUIRED)
pkg_check_modules( mylib REQUIRED ulapi mylib )
then link the library to your node
add_executable(mynode src/mynode.cpp)
target_link_libraries( my_exec ${ulapi_LIBRARIES} )
target_link_libraries(mynode ${mylib_LIBRARIES})
hope this helps
5 | No.5 Revision |
compile your i2c library similar to
add_library(mylib src/mylib.cpp)
then compile your node then link your library to your node
add_executable(mynode src/mynode.cpp)
target_link_libraries(mynode mylib)
If it is an external library
find_package( PkgConfig REQUIRED)
pkg_check_modules( mylib REQUIRED mylib )
or
FIND_LIBRARY(mylib_LIBRARIES mylib /path/to/lib)
then link the library to your node
add_executable(mynode src/mynode.cpp)
target_link_libraries(mynode ${mylib_LIBRARIES})
hope this helps