0

How can I include an SO file when I build for linux? With windows I simply put the dll in the same folder but that did not work with the linux build. In particular, I am building a go sciter project and need to include the libsciter-gtk-64.so in the executable/package.

rawsh
  • 395
  • 5
  • 21
  • Adding a dll to the source folder does not build it into the binary. Please show what exactly you're doing. – JimB Nov 14 '17 at 21:35

2 Answers2

0

My way of solving this was to use an additional tool, which had the added benefit of an optional desktop file and other metadata. AppImage solves the library problem, all I had to do was create an AppImage with the so files in /usr/lib/ and build through their command.

rawsh
  • 395
  • 5
  • 21
0

@Robert's solution is nice. One could also place the *.so file in the same directory as the executable and create a start.sh script with the line:

LD_LIBRARY_PATH="$(dirname "$0")" "$(dirname "$0")/your_executable"
adabru
  • 674
  • 7
  • 13