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.
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.
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?
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.
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…