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

Author Topic: If I install via apt-get, I compile my project and distribute it, will it run?  (Read 4929 times)

0 Members and 2 Guests are viewing this topic.

firet

  • Newbie
  • *
  • Posts: 15
  • Gamedev, web dev and C++ programmer.
    • View Profile
    • Future Games official site
    • Email
I have a Chromebook on which I'm running Linux. I installed SFML via apt-get, and no new files appeared (as is normal with apt-get?) I compile my app, and it runs. But if I distribute the executable, will it run on other devices without having to install SFML on that device?
I'm using GCC to compile.
Online I am: firet; flesheatindragon; Future Games.

Stauricus

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
    • A Mafia Graphic Novel
    • Email
i'm not the best person to explain this, but it depends.
if you set static libraries, everything will be compiled in your executable.
if you set dynamic libraries, its a bit more complex to set it (the users will have to download their own SFML; usually in managers like apt-get, this is done automatically).

but yes, you can install SFML through apt-get and distribute your executable.
Visit my game site (and hopefully help funding it? )
Website | IndieDB

firet

  • Newbie
  • *
  • Posts: 15
  • Gamedev, web dev and C++ programmer.
    • View Profile
    • Future Games official site
    • Email
Thanks!  :) Just one more question:
How do I statically link SFML libraries? I Googled it, but nothing was very useful. Also, does "usually in managers like apt-get, this is done automatically" mean I don't need to statically link them?
I'm considering having an installer shell script that will just install SFML on to the user device and set up the executable, so that's a fine backup plan :)
Online I am: firet; flesheatindragon; Future Games.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
apt-get will give you dynamic SFML libraries, you'd need to build SFML yourself as static library (check the CMake tutorial), but on Linux that's usually not recommended
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

firet

  • Newbie
  • *
  • Posts: 15
  • Gamedev, web dev and C++ programmer.
    • View Profile
    • Future Games official site
    • Email
Thanks! These forums are very helpful :). I think I may just go with the installer idea, because that way thhe app will be set up with the version of SFML that is suitable for that system.
Online I am: firet; flesheatindragon; Future Games.

 

anything