OpenRAVE - libraries

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenRAVE - libraries

Sebastian Kasperski
Dear Openrave Users,

I am using OpenRAVE within a C++ program and therefore need to specify
include-path and lib-path. For a more general solution, I wanted to use
"openrave-config" instead of the actual paths. While it worked nicely
with the headers, I had some problems with the libraries:

openrave-config --libs
-L/usr/local/lib -lopenrave -L/usr/lib -l/usr/lib/libboost_thread-mt.so

This leaves me with 2 errors:
1.) undefined reference to `OpenRAVE::CreateEnvironment(bool)'
2.) /usr/bin/ld: cannot find -libboost_thread-mt.so

About 1.) Can be fixed by adding -lopenrave-core
About 2.) It can't find this library, although it is exactly there
(/usr/lib -l/usr/lib/libboost_thread-mt.so). Somehow it only works, when
I replace "-l/usr/lib/libboost_thread-mt.so" with "-lboost_thread-mt".

Did I do anything else wrong? It would be nicer and more flexible to use
openrave-config instead of all the separate pathes.

Best regards and thanks in advance
Sebastian


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: OpenRAVE - libraries

Rosen Diankov
Administrator
Hi Sebastian,

Thank you for noticing. We have started using the FindOpenRAVE.cmake
file for getting the correct flags, and for some reason that resolves
the problems with openrave-config

In any case two fixes were just committed to openrave-config (r1531):

1. For boost libraries, removed the '-l' from the .so file. Apparently
gcc only likes short library names specified with '-l'

2. Added a '--libs-core' option for also including openrave-core. The
reason openrave-core is not included as default is because plugin
authors do not need to link with the environment. openrave-core links
with 4x more libraries making it a little heavy.

rosen,

2010/6/23 Sebastian Kasperski <[hidden email]>:

> Dear Openrave Users,
>
> I am using OpenRAVE within a C++ program and therefore need to specify
> include-path and lib-path. For a more general solution, I wanted to use
> "openrave-config" instead of the actual paths. While it worked nicely
> with the headers, I had some problems with the libraries:
>
> openrave-config --libs
> -L/usr/local/lib -lopenrave -L/usr/lib -l/usr/lib/libboost_thread-mt.so
>
> This leaves me with 2 errors:
> 1.) undefined reference to `OpenRAVE::CreateEnvironment(bool)'
> 2.) /usr/bin/ld: cannot find -libboost_thread-mt.so
>
> About 1.) Can be fixed by adding -lopenrave-core
> About 2.) It can't find this library, although it is exactly there
> (/usr/lib -l/usr/lib/libboost_thread-mt.so). Somehow it only works, when
> I replace "-l/usr/lib/libboost_thread-mt.so" with "-lboost_thread-mt".
>
> Did I do anything else wrong? It would be nicer and more flexible to use
> openrave-config instead of all the separate pathes.
>
> Best regards and thanks in advance
> Sebastian
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users