ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

catkin_make with postgreSQL link pqxx??

asked 2018-03-23 09:49:17 -0500

ogensyts gravatar image

Hi

how do i link pqxx to catkin_make?

according to pqxx documentation, i have to add -lpxx -lpq to cmake_args, i added it via --cmake-args "-lpqxx -lpq"

i have undefined references errors when compiling with catkin_make

thanks

edit retag flag offensive close merge delete

Comments

Have you solved this problem? I meet the same question ,can you tell me how the solve this problem?

hwliu gravatar image hwliu  ( 2022-08-03 04:21:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-23 10:40:55 -0500

gvdhoorn gravatar image

Catkin == CMake in this case (ie: when linking libraries).

You have to add your libraries to the appropriate target_link_libraries(..) statement. Not to your catkin_make invocation.

edit flag offensive delete link more

Comments

I have put this and it still dosent work : target_link_libraries(listener ${catkin_LIBRARIES} ${PQXX_LIBRARY} ${POSTGRES_LIBRARIES} ${PQXX_HEADER_PATH} ${POSTGRES_INCLUDE_DIRECTORIES})

ogensyts gravatar image ogensyts  ( 2018-03-23 12:12:59 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-03-23 09:49:17 -0500

Seen: 207 times

Last updated: Mar 23 '18