Author Topic: dynamic libs (driver) settings  (Read 3312 times)

Offline ElKaputto

  • Single posting newcomer
  • *
  • Posts: 2
dynamic libs (driver) settings
« on: June 19, 2013, 10:14:18 pm »
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: dynamic libs (driver) settings
« Reply #1 on: June 20, 2013, 12:10:45 am »
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!]

Offline ElKaputto

  • Single posting newcomer
  • *
  • Posts: 2
Re: dynamic libs (driver) settings
« Reply #2 on: June 20, 2013, 09:03:50 am »
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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: dynamic libs (driver) settings
« Reply #3 on: June 20, 2013, 11:57:22 am »
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!]