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

Specifying non-standard library path

asked 2011-07-10 08:54:02 -0600

DavidS gravatar image

How do I specify a non-standard library path while building a standard ROS package?

I tried:

LDFLAGS='-L/usr/local/hdf5/lib/' rosmake pcl

which did not work.

Archlinux 2.6.39-ARCH

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
3

answered 2011-07-10 12:11:07 -0600

dornhege gravatar image

You can add a link_directories(/usr/local/hdf5/lib) entry to the package's CMakeLists.txt.

Depending on the library you look for, there might be a nice CMake way (instead of hardcoding): CMake libraries.

I'm not aware of a nice ROS way similar to rosdep.

edit flag offensive delete link more
1

answered 2011-07-11 03:30:52 -0600

Brian Gerkey gravatar image

Assuming that you're using gcc, try this:

LIBRARY_PATH=/usr/local/hdf5/lib rosmake pcl

If there are shared libraries in there, you'll also need to add that directory to LD_LIBRARY_PATH at runtime to execute programs that link against hdf5.

edit flag offensive delete link more
1

answered 2011-07-12 12:53:31 -0600

DavidS gravatar image

Using environmental variables does not appear to work...

In the end, I had to change CMakeLists.txt.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-07-10 08:54:02 -0600

Seen: 5,510 times

Last updated: Jul 12 '11