0

So, I made a program in Linux(OpenSUSE), using C++ and SFML.

I tried to send the compiled program to a friend of mine (also on Linux) but it said it was missing the DLL's. So I included all the ".so" that I used (audio, graphics, window, and system) but when he tries to run it, it keeps giving an error:

error while loading shared libraries: libsfml-audio.so.2.4: cannot open shared object file: No such file or directory

So I went to check, and I definitely included the "libsfml-audio.so.2.4" file.

I really don't want to have to make him install SFML just so he can run it.

Thanks in advance for any help.

jww
  • 97,681
  • 90
  • 411
  • 885

1 Answers1

2

Linux is a bit more nitpicky when it comes to loading shared libraries.

Easiest solution is to indeed bundle your shared libraries and tell the program to actually load them from there.

Let's assume the shared libraries are next to your executable, you'd launch it like this:

LD_LIBRARY_PATH=. ./yourExecutableName
Mario
  • 35,726
  • 5
  • 62
  • 78
  • Why did the SONAME ***not*** work? Maybe related, [C++ linker missing library when running (SONAME behavior)](https://stackoverflow.com/q/10199045/608639) – jww Jun 05 '17 at 02:28
  • @jww No idea. But yeah, it's likely something like in the linked question. – Mario Jun 05 '17 at 07:10