3

Was learning c++ really fast,but I stopped because I just can't find a way to deploy the applications with their dependant libraries on linux.cant I just include the .so files in the same directory as my executable.

Comments
  • 1
    Are you using gcc?
  • 1
    @RazorSh4rk yes
  • 1
    Try compiling with codeblocks, i forgot the gcc flags, but cb links files automatically
  • 1
    @RazorSh4rk I am using code blocks
  • 1
    @zmzmuazzam98 I mean I'm using code blocks ide with the GCC compiler
  • 1
    Ill look into it once i get to the office, i dont have it set up at home @zmzmuazzam98
  • 0
    Just copy all the .sos into /usr/local/lib or any other folder configured as linker search path for dynamic libs. Man knows what you need to know.
    Bundling them in the same folder is acceptable but discouraged (because it's space inefficient) unless you're libs conflict with preinstalled ones. If you end up bundling them you might as well make a .AppImage for the sake of convenience and efficiency.
    P.S. Sorry of anything is incorrect, I was Linux deprived for ONE AND A HALF ******* years
  • 0
    @Stefan7650606 is this method a method that will make sure that every person I distribute my sfml game (assuming persons machine runs linux) will work with the .so libraries when the executable is run.
  • 1
    Why are you not using static linking?
  • 0
    @crkrJack A lib is a unit of code that is bundled within your application executable. So if I use static libraries doesn't it make my executable bigger.
  • 0
  • 1
    @zmzmuazzam98 To reply to your reply to crkrJack's comment, it will but you would end up using even more space with dyn libs than with static ones unless you redistribute a dozen of your apps all linking to same libs(so lib bundling in the apps folder is out of question). Besides nobody cares if your app bundle would be 36 or 48 MB, they all probably have unmetered connections for downloading(unlike me 😋) and are probably used to downloading 150Mb app just to write an iso.
    P.S. Statically linking SFML 2.4.0 on Windows increased the size by 4Mb
Add Comment