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

Author Topic: Linux static build  (Read 4849 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Linux static build
« on: March 23, 2008, 09:18:58 am »
Hi

I've updated the SFML makefiles to be able to generate static builds.

However, I'm not an expert in makefiles nor static builds on Linux, so I need your opinion :

1. Is it safe to include external libraries directly into SFML ones, as I do on Windows ? Or libraries can be too different from a Linux to another ?

2. If it's not safe, what would be the best solution to prevent users from having to link to every external lib used by SFML ? In other words, I'd like to avoid that :
Code: [Select]
g++ app.cpp -o app -lpthread -lX11 -lGL -lXrandr -lfreetype -lsfml-graphics -lsfml-window -lsfml-system

Thanks :)
Laurent Gomila - SFML developer

Lord Delvin

  • Jr. Member
  • **
  • Posts: 68
    • ICQ Messenger - 166781460
    • View Profile
Linux static build
« Reply #1 on: March 23, 2008, 11:30:42 pm »
Afaik 1) is ok and by static linking you cant produce any kind of error.
BUT what you want to avoid, is a big strength of all linux distros with a package manager(that is ­~all), as they will provide you with external libraries if they arent yet installed.
That will lead to a less bloated system as you'll have the same code only once.

 

anything