ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A
Ask Your Question

Specifying non-standard library path

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

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

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

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

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

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

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


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

Seen: 853 times

Last updated: Jul 12 '11