This question has already been answered:

How to specify the path to the library?

There is an example binary, which when launched requires you to specify the path to the libraries libex.so , libamp.so . You need to write a script script.sh , which will indicate the path to these libraries.

There are feats, but curves and incorrect. Script content:

 LD_LIBRARY_PATH=libex:. libamp:. ./example 

I have a complete mess in my head with these ways.

Reported as a duplicate by members of aleksandr barakin , zRrr , sercxjo , cheops , user194374 11 Jun '16 at 5:58 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

1 answer 1

 #!/bin/sh export LD_LIBRARY_PATH=/каталог/с/so-1:/каталог/с/so-2:/каталог/с/so-3 /home/neko69/bin/example 

There is no need to specify files here, only the paths.

  • I apologize, could you indicate this instruction for the example script? - neko69
  • See Answer Update - PinkTux
  • What does "with / so-1, / s / so-2" mean? - neko69
  • /каталог/с/so-1 means the directory with the first of the required bipod. If this directory is the same for all libraries, then the rest is not necessary. Your KO - PinkTux
  • what does /c mean and why is it needed at all? - neko69