Jump to content
  • Advertisement
Sign in to follow this  
SriLumpa

Statically linking with a game engine

This topic is 2798 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

My game currently uses Irrlicht and SDL_Mixer.
For those two, I would like to compile my binary in a way that users will not need to have them installed on their system, so I'm trying static linking.

It quickly becomes complicated, since to me it is not clear what other libraries they depend on. I ended up randomly adding libs like libjpeg etc ...

Is there a right way to do that ?

Do I have to go static all the way, or should I leave dynamic dependencies to keep some portability ?

I am using Linux + Codeblocks, if that matters.
Is there a philosophy difference between Linux/Windows about this ?

Thanks for any hint !

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Is there a philosophy difference between Linux/Windows about this ?
Kind of. In Windows these days, if you want to be able to run an application without installing a bunch of DLLs, you use side-by-side assemblies. (This also helps with versioning problems.) Linux's philosophy is to always do the versioning in /usr/lib. You can do the side-by-side thing with Linux (if I recall correctly, which I may well not, since it's been awhile) by linking your program with an option that changes the dynamic linker's library path, but it's not common. Linux is very fond of its package management (rightly so), so minimizing dependencies like that is not as big a win.

Share this post


Link to post
Share on other sites
Thanks. I'll keep dynamic linking for Linux, as you convinced me it's more elegant.

Now for Windows, I did not know side-by-side assemblies, but if I get it right, it only solves dll hell, but the user still has to install the libraries. Or can I bundle the libs with my program, and indicate in the manifest that these local files have to be used ?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!