Static libs + load-display

Hi,

I’m trying to compile panda as static libs.
Finally, I did it,

however, now, it will not run, because it is loading libpandadx8.dll,
but it is static lib (libpandadx8.lib).
I want to make it all static, so it will not need this dll.

I appreciate any help

You can compile Panda3D statically by setting LINK_ALL_STATIC to True in makepanda/makepandacore.py, or defining that variable to 1 if you use the ppremake build system.

Hi,
thanks a lot,

however it is set. The problem is, that if I run the sample, it is initializing the modules and tries to load default graphics pipe (which result in error).
How should I force it to use ‘linked’ dx8 lib?

Oh, now I understand the problem. Sorry.

I think that, when linked statically, the pandadx8 library should be initialised manually (rather than via a load-display Config.prc line) by calling the following before starting the game:

init_libpandadx8();

That registers the dx8 pipe with the GraphicsPipeSelection.

You need to include pandadx8.h before you can call that.

Hi,

thanks a lot, it works :smiley:

However I have another problems now. I cannot open an egg file, (the library I compiled supports only bam), so I will look into forum.

I wish you a nice day

I think the same applies here, but init_libpandaegg() in this case.

I tried to compile statically the other day as well…did you get a lot of compiler warnings about symbols not being accessible in the libs that are compiled later in the build process (libpandaegg.lib, etc)? I can get them all to compile but whens something such as the egger goes to link with those libs they’re basically empty…

~Andrew