diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 9f0f1d928e..ef37ac1964 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -2606,18 +2606,21 @@ PANDAVERSION_H_RUNTIME=""" CHECKPANDAVERSION_CXX=""" # include "dtoolbase.h" -EXPCL_DTOOL_DTOOLUTIL int panda_version_$VERSION1_$VERSION2 = 0; +EXPCL_DTOOL_DTOOLBASE int panda_version_$VERSION1_$VERSION2 = 0; """ CHECKPANDAVERSION_H=""" +# ifndef CHECKPANDAVERSION_H +# define CHECKPANDAVERSION_H # include "dtoolbase.h" -extern EXPCL_DTOOL_DTOOLUTIL int panda_version_$VERSION1_$VERSION2; -# ifndef WIN32 -/* For Windows, exporting the symbol from the DLL is sufficient; the - DLL will not load unless all expected public symbols are defined. - Other systems may not mind if the symbol is absent unless we - explictly write code that references it. */ -static int check_panda_version = panda_version_$VERSION1_$VERSION2; +extern EXPCL_DTOOL_DTOOLBASE int panda_version_$VERSION1_$VERSION2; +// Hack to forcibly depend on the check +template +class CheckPandaVersion { +public: + int check() { return panda_version_$VERSION1_$VERSION2; } +}; +template class CheckPandaVersion; # endif """