Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Best way to compile and package a SFML 2 program on Linux?  (Read 1129 times)

0 Members and 1 Guest are viewing this topic.

MaTachi

  • Newbie
  • *
  • Posts: 5
    • View Profile
Best way to compile and package a SFML 2 program on Linux?
« on: October 11, 2012, 01:29:25 am »
Hi!

I'm using Ubuntu and is their repository is only SFML 1.6 available, so I need to add the SFML 2 library files to my program somehow. I currently have a bash script to start the program:

export LD_LIBRARY_PATH=sfml/lib && ./bin/main

It says where the library files can be found and starts the program. But that isn't a very elegant solution imo, and I wonder if it's possible to do this in a better way. Is it possible to compile or link the program so the external library files aren't needed? I would like a solution that gives me a single executable file that I can double click to start.

MTFBWYA,
MaTachi

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Best way to compile and package a SFML 2 program on Linux?
« Reply #1 on: October 11, 2012, 09:59:03 am »
You can compile SFML statically. Or you can also use rpath features to avoid the startup script.
Laurent Gomila - SFML developer