Static or dynamic?

Hey panda’s.

If I make a game in c++, and compile it using the g++ compiler, is it then static linked or dynamically?
If dynamically, is it possible to generate a static executable, so the person who wants to play the game doesn’t have to download the whole panda3d separately?

(by the way. im using linux)

I’m not sure about g++, but with VC compilers you can choose if you want dynamic or static linking (/MT for example). The proper g++ might be -static, but I’m not sure. You should read the g++ man pages explaining the g++ flags.
enn0x

It’s a question of how you compiled Panda. But for all practical purposes, it really doesn’t matter–either the user will have to download a single executable, plus a bunch of models and other assets, or the user will have to download a (smaller) executable, plus a bunch of .so’s, plus a bunch of models and other assets.

Since you have to download assets with just about any game, you’ll have to come up with some kind of packaging scheme anyway. So it doesn’t matter much if the program itself is in a single executable or if it consists of an executable and a series of .so files.

David

Thanks for the information! :slight_smile: