News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

dynamic libs (driver) settings

Started by ElKaputto, June 19, 2013, 10:14:18 PM

Previous topic - Next topic

ElKaputto

Hello everyone,

I'm new to this forum and I'mk coming up with a question. Also I hope I am writing in the correct category.
I am programming on OpenNi and when I compile my code, I don't get an Error.
But running the code brings up the message that the file named *.so is not found.
I guess it has something to do with dynamic linker options (a makefile does it with something like "-Wl, rpath./").
So the code cannot find the driver of the sensor.

My question is: Where and how to put the right linker options for it?

Thx in advance!

ElKaputto

oBFusCATed

Read about LD_LIBRARY_PATH... and try to run your executable from a terminal.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ElKaputto

Thx for the hint.

From a terminal I can run this program. (If I run the makefile before).
Is there really no way to run it with the green "compile&run"-button?

oBFusCATed

There is, but you should no what you're doing.

There are many options:
1. C::B's build systems automatically modifies the LD_LIBRARY_PATH for you and adds all library search paths to it
2. You can use the env variable plugin change the variable
3. You can use -rpath to make the executable know where to find the libs
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]