diff --git a/pandatool/src/bam/bamInfo.cxx b/pandatool/src/bam/bamInfo.cxx index b7c6fbaae4..b955af5609 100644 --- a/pandatool/src/bam/bamInfo.cxx +++ b/pandatool/src/bam/bamInfo.cxx @@ -29,6 +29,7 @@ #include "pvector.h" #include "bamCacheRecord.h" #include "bamCacheIndex.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: BamInfo::Constructor @@ -335,6 +336,9 @@ list_hierarchy(PandaNode *node, int indent_level) { } int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + BamInfo prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/bam/bamToEgg.cxx b/pandatool/src/bam/bamToEgg.cxx index f7ec4bb148..c7ed71783a 100644 --- a/pandatool/src/bam/bamToEgg.cxx +++ b/pandatool/src/bam/bamToEgg.cxx @@ -45,6 +45,7 @@ #include "eggMaterial.h" #include "somethingToEggConverter.h" #include "dcast.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// @@ -609,6 +610,9 @@ get_egg_texture(Texture *tex) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + BamToEgg prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/bam/eggToBam.cxx b/pandatool/src/bam/eggToBam.cxx index 65fcbb988e..27a724bd85 100644 --- a/pandatool/src/bam/eggToBam.cxx +++ b/pandatool/src/bam/eggToBam.cxx @@ -36,6 +36,7 @@ #include "load_prc_file.h" #include "windowProperties.h" #include "frameBufferProperties.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggToBam::Constructor @@ -461,6 +462,9 @@ make_buffer() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggToBam prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/cvscopy/testCopy.cxx b/pandatool/src/cvscopy/testCopy.cxx index e9d3647f8b..de9f3095bc 100644 --- a/pandatool/src/cvscopy/testCopy.cxx +++ b/pandatool/src/cvscopy/testCopy.cxx @@ -18,6 +18,7 @@ #include "testCopy.h" #include "cvsSourceDirectory.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: TestCopy::Constructor @@ -69,6 +70,9 @@ copy_file(const Filename &source, const Filename &dest, int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + TestCopy prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/dxfprogs/dxfPoints.cxx b/pandatool/src/dxfprogs/dxfPoints.cxx index b74222096e..21c07678f5 100644 --- a/pandatool/src/dxfprogs/dxfPoints.cxx +++ b/pandatool/src/dxfprogs/dxfPoints.cxx @@ -17,6 +17,7 @@ //////////////////////////////////////////////////////////////////// #include "dxfPoints.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: DXFPoints::Constructor @@ -95,6 +96,9 @@ handle_args(ProgramBase::Args &args) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + DXFPoints prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/dxfprogs/dxfToEgg.cxx b/pandatool/src/dxfprogs/dxfToEgg.cxx index 20f6388930..5df2f072dc 100644 --- a/pandatool/src/dxfprogs/dxfToEgg.cxx +++ b/pandatool/src/dxfprogs/dxfToEgg.cxx @@ -19,6 +19,7 @@ #include "dxfToEgg.h" #include "dxfToEggConverter.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: DXFToEgg::Constructor @@ -75,6 +76,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + DXFToEgg prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/dxfprogs/eggToDXF.cxx b/pandatool/src/dxfprogs/eggToDXF.cxx index 362cb1b7e2..06e4157fd1 100644 --- a/pandatool/src/dxfprogs/eggToDXF.cxx +++ b/pandatool/src/dxfprogs/eggToDXF.cxx @@ -19,6 +19,7 @@ #include "eggToDXF.h" #include "eggPolygon.h" #include "dcast.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggToDXF::Constructor @@ -160,6 +161,9 @@ write_entities(ostream &out) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggToDXF prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/egg-mkfont/eggMakeFont.cxx b/pandatool/src/egg-mkfont/eggMakeFont.cxx index 260138b31c..3049e4696b 100644 --- a/pandatool/src/egg-mkfont/eggMakeFont.cxx +++ b/pandatool/src/egg-mkfont/eggMakeFont.cxx @@ -34,6 +34,7 @@ #include "eggVertex.h" #include "string_utils.h" #include "dcast.h" +#include "pystub.h" #include @@ -702,6 +703,9 @@ is_numeric(const string &str) { } int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggMakeFont prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/egg-optchar/eggOptchar.cxx b/pandatool/src/egg-optchar/eggOptchar.cxx index 93cbd2309b..0bd8f177f2 100644 --- a/pandatool/src/egg-optchar/eggOptchar.cxx +++ b/pandatool/src/egg-optchar/eggOptchar.cxx @@ -33,6 +33,7 @@ #include "pset.h" #include "compose_matrix.h" #include "fftCompressor.h" +#include "pystub.h" #include @@ -1347,6 +1348,9 @@ rename_primitives(EggGroupNode *egg_group, const string &name) { } int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggOptchar prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/egg-palettize/eggPalettize.cxx b/pandatool/src/egg-palettize/eggPalettize.cxx index 6d5c4d17d9..b2f5beff03 100644 --- a/pandatool/src/egg-palettize/eggPalettize.cxx +++ b/pandatool/src/egg-palettize/eggPalettize.cxx @@ -28,6 +28,7 @@ #include "pnotify.h" #include "notifyCategory.h" #include "notifySeverity.h" +#include "pystub.h" #include @@ -858,6 +859,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggPalettize prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/egg-qtess/eggQtess.cxx b/pandatool/src/egg-qtess/eggQtess.cxx index 49cd3f201f..1c2fbfde84 100644 --- a/pandatool/src/egg-qtess/eggQtess.cxx +++ b/pandatool/src/egg-qtess/eggQtess.cxx @@ -19,6 +19,7 @@ #include "eggQtess.h" #include "qtessGlobals.h" #include "dcast.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggQtess::Constructor @@ -347,6 +348,9 @@ find_surfaces(EggNode *egg_node) { } int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggQtess prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/eggprogs/eggCrop.cxx b/pandatool/src/eggprogs/eggCrop.cxx index cb4241f7cc..701e58d0f4 100644 --- a/pandatool/src/eggprogs/eggCrop.cxx +++ b/pandatool/src/eggprogs/eggCrop.cxx @@ -22,6 +22,7 @@ #include "eggPrimitive.h" #include "eggVertex.h" #include "dcast.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggCrop::Constructor @@ -132,6 +133,9 @@ strip_prims(EggGroupNode *group) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggCrop prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/eggprogs/eggListTextures.cxx b/pandatool/src/eggprogs/eggListTextures.cxx index 63431ce3bf..d43b97d593 100644 --- a/pandatool/src/eggprogs/eggListTextures.cxx +++ b/pandatool/src/eggprogs/eggListTextures.cxx @@ -19,6 +19,7 @@ #include "eggListTextures.h" #include "eggTextureCollection.h" #include "pnmImageHeader.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggListTextures::Constructor @@ -66,6 +67,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggListTextures prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/eggprogs/eggMakeTube.cxx b/pandatool/src/eggprogs/eggMakeTube.cxx index 1b54e3605c..ecb030acfe 100644 --- a/pandatool/src/eggprogs/eggMakeTube.cxx +++ b/pandatool/src/eggprogs/eggMakeTube.cxx @@ -23,6 +23,7 @@ #include "eggPolygon.h" #include "pointerTo.h" #include "look_at.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggMakeTube::Constructor @@ -281,6 +282,9 @@ add_polygon(EggVertex *a, EggVertex *b, EggVertex *c, EggVertex *d) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggMakeTube prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/eggprogs/eggRename.cxx b/pandatool/src/eggprogs/eggRename.cxx index de947dec67..3fedfad5ae 100755 --- a/pandatool/src/eggprogs/eggRename.cxx +++ b/pandatool/src/eggprogs/eggRename.cxx @@ -17,6 +17,7 @@ //////////////////////////////////////////////////////////////////// #include "eggRename.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggRename::Constructor @@ -59,6 +60,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggRename prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/eggprogs/eggRetargetAnim.cxx b/pandatool/src/eggprogs/eggRetargetAnim.cxx index e324a93a36..2e4fcad8e5 100644 --- a/pandatool/src/eggprogs/eggRetargetAnim.cxx +++ b/pandatool/src/eggprogs/eggRetargetAnim.cxx @@ -26,6 +26,7 @@ #include "eggJointPointer.h" #include "eggTable.h" #include "compose_matrix.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggRetargetAnim::Constructor @@ -197,6 +198,9 @@ retarget_anim(EggCharacterData *char_data, EggJointData *joint_data, int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggRetargetAnim prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/eggprogs/eggTextureCards.cxx b/pandatool/src/eggprogs/eggTextureCards.cxx index 4c56596732..cee776a395 100644 --- a/pandatool/src/eggprogs/eggTextureCards.cxx +++ b/pandatool/src/eggprogs/eggTextureCards.cxx @@ -24,6 +24,7 @@ #include "eggTexture.h" #include "eggPolygon.h" #include "pnmImageHeader.h" +#include "pystub.h" #include @@ -418,6 +419,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggTextureCards prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/eggprogs/eggToC.cxx b/pandatool/src/eggprogs/eggToC.cxx index 4f761362e4..552ef62ebf 100644 --- a/pandatool/src/eggprogs/eggToC.cxx +++ b/pandatool/src/eggprogs/eggToC.cxx @@ -26,6 +26,7 @@ #include "eggPolysetMaker.h" #include "eggBin.h" #include "string_utils.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggToC::Constructor @@ -377,6 +378,9 @@ write_bin(EggBin *bin) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggToC prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/eggprogs/eggTopstrip.cxx b/pandatool/src/eggprogs/eggTopstrip.cxx index 47ebd3438f..bc70635966 100644 --- a/pandatool/src/eggprogs/eggTopstrip.cxx +++ b/pandatool/src/eggprogs/eggTopstrip.cxx @@ -26,6 +26,7 @@ #include "eggJointPointer.h" #include "eggTable.h" #include "compose_matrix.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggTopstrip::Constructor @@ -364,6 +365,9 @@ adjust_transform(LMatrix4d &mat) const { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggTopstrip prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/eggprogs/eggTrans.cxx b/pandatool/src/eggprogs/eggTrans.cxx index 56d9964595..8c3a7e4f7e 100644 --- a/pandatool/src/eggprogs/eggTrans.cxx +++ b/pandatool/src/eggprogs/eggTrans.cxx @@ -18,6 +18,7 @@ #include "eggTrans.h" #include "eggGroupUniquifier.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggTrans::Constructor @@ -138,6 +139,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggTrans prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/fltprogs/eggToFlt.cxx b/pandatool/src/fltprogs/eggToFlt.cxx index fe12212b4d..ac5210f4cb 100644 --- a/pandatool/src/fltprogs/eggToFlt.cxx +++ b/pandatool/src/fltprogs/eggToFlt.cxx @@ -39,6 +39,7 @@ #include "dcast.h" #include "string_utils.h" #include "vector_string.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggToFlt::Constructor @@ -696,6 +697,9 @@ get_flt_texture(EggTexture *egg_texture) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggToFlt prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/fltprogs/fltCopy.cxx b/pandatool/src/fltprogs/fltCopy.cxx index ec9252cef4..941d53a896 100644 --- a/pandatool/src/fltprogs/fltCopy.cxx +++ b/pandatool/src/fltprogs/fltCopy.cxx @@ -24,6 +24,7 @@ #include "fltExternalReference.h" #include "fltError.h" #include "dcast.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: FltCopy::Constructor @@ -248,6 +249,9 @@ scan_flt(FltRecord *record, FltCopy::Refs &refs, FltCopy::Textures &textures) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + FltCopy prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/fltprogs/fltInfo.cxx b/pandatool/src/fltprogs/fltInfo.cxx index bd5afcc84a..848840a9da 100644 --- a/pandatool/src/fltprogs/fltInfo.cxx +++ b/pandatool/src/fltprogs/fltInfo.cxx @@ -20,6 +20,7 @@ #include "fltHeader.h" #include "indent.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: FltInfo::Constructor @@ -103,6 +104,9 @@ handle_args(ProgramBase::Args &args) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + FltInfo prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/fltprogs/fltToEgg.cxx b/pandatool/src/fltprogs/fltToEgg.cxx index fd64a1a4e7..51b58af868 100644 --- a/pandatool/src/fltprogs/fltToEgg.cxx +++ b/pandatool/src/fltprogs/fltToEgg.cxx @@ -20,6 +20,7 @@ #include "fltToEggConverter.h" #include "config_flt.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: FltToEgg::Constructor @@ -106,6 +107,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + init_libflt(); FltToEgg prog; prog.parse_command_line(argc, argv); diff --git a/pandatool/src/fltprogs/fltTrans.cxx b/pandatool/src/fltprogs/fltTrans.cxx index 50adf29512..8934b86d83 100644 --- a/pandatool/src/fltprogs/fltTrans.cxx +++ b/pandatool/src/fltprogs/fltTrans.cxx @@ -19,6 +19,7 @@ #include "fltTrans.h" #include "fltHeader.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: FltTrans::Constructor @@ -136,6 +137,9 @@ handle_args(ProgramBase::Args &args) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + FltTrans prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/gtk-stats/gtkStats.cxx b/pandatool/src/gtk-stats/gtkStats.cxx index 77370754c9..bbc50aae91 100644 --- a/pandatool/src/gtk-stats/gtkStats.cxx +++ b/pandatool/src/gtk-stats/gtkStats.cxx @@ -20,6 +20,7 @@ #include "gtkStats.h" #include "gtkStatsServer.h" #include "config_pstats.h" +#include "pystub.h" GtkWidget *main_window; static GtkStatsServer *server = NULL; @@ -57,6 +58,9 @@ timer(gpointer data) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + gtk_init(&argc, &argv); main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); diff --git a/pandatool/src/imageprogs/imageInfo.cxx b/pandatool/src/imageprogs/imageInfo.cxx index 4181aa4a07..8f9ead949c 100755 --- a/pandatool/src/imageprogs/imageInfo.cxx +++ b/pandatool/src/imageprogs/imageInfo.cxx @@ -18,6 +18,7 @@ #include "imageInfo.h" #include "pnmImageHeader.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: ImageInfo::Constructor @@ -79,6 +80,9 @@ handle_args(ProgramBase::Args &args) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + ImageInfo prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/imageprogs/imageResize.cxx b/pandatool/src/imageprogs/imageResize.cxx index 2fa2113714..27bc9d6bd1 100755 --- a/pandatool/src/imageprogs/imageResize.cxx +++ b/pandatool/src/imageprogs/imageResize.cxx @@ -18,6 +18,7 @@ #include "imageResize.h" #include "string_utils.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: ImageResize::Constructor @@ -126,6 +127,9 @@ dispatch_size_request(const string &opt, const string &arg, void *var) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + ImageResize prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/imageprogs/imageTrans.cxx b/pandatool/src/imageprogs/imageTrans.cxx index 417e985eab..e871b65c93 100644 --- a/pandatool/src/imageprogs/imageTrans.cxx +++ b/pandatool/src/imageprogs/imageTrans.cxx @@ -18,6 +18,7 @@ #include "imageTrans.h" #include "string_utils.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: ImageTrans::Constructor @@ -182,6 +183,9 @@ extract_alpha() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + ImageTrans prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/lwo/test_lwo.cxx b/pandatool/src/lwo/test_lwo.cxx index ef2490f1ee..9214f3d22e 100644 --- a/pandatool/src/lwo/test_lwo.cxx +++ b/pandatool/src/lwo/test_lwo.cxx @@ -19,9 +19,13 @@ #include "lwoInputFile.h" #include "lwoChunk.h" #include "config_lwo.h" +#include "pystub.h" int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + init_liblwo(); if (argc != 2) { nout << "test_lwo file.lwo\n"; diff --git a/pandatool/src/lwoprogs/lwoScan.cxx b/pandatool/src/lwoprogs/lwoScan.cxx index 1cf311d24d..6703217556 100644 --- a/pandatool/src/lwoprogs/lwoScan.cxx +++ b/pandatool/src/lwoprogs/lwoScan.cxx @@ -21,6 +21,7 @@ #include "lwoInputFile.h" #include "lwoChunk.h" #include "config_lwo.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: LwoScan::Constructor @@ -86,6 +87,9 @@ handle_args(ProgramBase::Args &args) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + init_liblwo(); LwoScan prog; prog.parse_command_line(argc, argv); diff --git a/pandatool/src/lwoprogs/lwoToEgg.cxx b/pandatool/src/lwoprogs/lwoToEgg.cxx index bc3b41804a..c9687e7c26 100644 --- a/pandatool/src/lwoprogs/lwoToEgg.cxx +++ b/pandatool/src/lwoprogs/lwoToEgg.cxx @@ -22,6 +22,7 @@ #include "lwoHeader.h" #include "lwoInputFile.h" #include "config_lwo.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: LwoToEgg::Constructor @@ -87,6 +88,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + init_liblwo(); LwoToEgg prog; prog.parse_command_line(argc, argv); diff --git a/pandatool/src/mayaprogs/eggToMaya.cxx b/pandatool/src/mayaprogs/eggToMaya.cxx index 16d287f02f..61c3e516dc 100755 --- a/pandatool/src/mayaprogs/eggToMaya.cxx +++ b/pandatool/src/mayaprogs/eggToMaya.cxx @@ -19,6 +19,7 @@ #include "eggToMaya.h" #include "mayaEggLoader.h" #include "mayaApi.h" +#include "pystub.h" // We must define this to prevent Maya from doubly-declaring its // MApiVersion string in this file as well as in libmayaegg. @@ -111,6 +112,9 @@ run() { } int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + EggToMaya prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/mayaprogs/mayaCopy.cxx b/pandatool/src/mayaprogs/mayaCopy.cxx index ddf7889058..64c94293f8 100644 --- a/pandatool/src/mayaprogs/mayaCopy.cxx +++ b/pandatool/src/mayaprogs/mayaCopy.cxx @@ -21,6 +21,7 @@ #include "cvsSourceDirectory.h" #include "mayaShader.h" #include "dcast.h" +#include "pystub.h" #include "pre_maya_include.h" #include @@ -437,6 +438,9 @@ collect_shader_for_node(const MDagPath &dag_path) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + MayaCopy prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/mayaprogs/mayaToEgg.cxx b/pandatool/src/mayaprogs/mayaToEgg.cxx index 7bd6983a01..4057f2d8af 100644 --- a/pandatool/src/mayaprogs/mayaToEgg.cxx +++ b/pandatool/src/mayaprogs/mayaToEgg.cxx @@ -21,6 +21,7 @@ #include "config_mayaegg.h" #include "config_maya.h" // for maya_cat #include "globPattern.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: MayaToEgg::Constructor @@ -255,6 +256,9 @@ dispatch_transform_type(const string &opt, const string &arg, void *var) { } int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + MayaToEgg prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/miscprogs/binToC.cxx b/pandatool/src/miscprogs/binToC.cxx index 7faa516c5a..0129bff83b 100644 --- a/pandatool/src/miscprogs/binToC.cxx +++ b/pandatool/src/miscprogs/binToC.cxx @@ -18,6 +18,7 @@ #include "binToC.h" +#include "pystub.h" // The number of bytes across the page to write. static const int col_width = 11; @@ -152,6 +153,9 @@ handle_args(ProgramBase::Args &args) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + BinToC prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/progbase/Sources.pp b/pandatool/src/progbase/Sources.pp index 5cdd674875..7c514aed86 100644 --- a/pandatool/src/progbase/Sources.pp +++ b/pandatool/src/progbase/Sources.pp @@ -8,12 +8,7 @@ pipeline:c event:c panda:m \ pandabase:c pnmimage:c linmath:c putil:c express:c \ interrogatedb:c prc:c dconfig:c dtoolconfig:m \ - dtoolutil:c dtoolbase:c dtool:m \ - pystub - -// We link with pystub so we can include pystub.h here in -// programBase.cxx, so that every silly little executable in Pandatool -// doesn't have to include pystub.h. + dtoolutil:c dtoolbase:c dtool:m #define COMBINED_SOURCES $[TARGET]_composite1.cxx diff --git a/pandatool/src/progbase/programBase.cxx b/pandatool/src/progbase/programBase.cxx index 8abd5103b4..7a568ec83a 100644 --- a/pandatool/src/progbase/programBase.cxx +++ b/pandatool/src/progbase/programBase.cxx @@ -19,11 +19,6 @@ #include "programBase.h" #include "wordWrapStream.h" -#include "pystub.h" -// Since programBase.cxx includes pystub.h, no program that links with -// progbase needs to do so. No Python code should attempt to link -// with libprogbase.so. - #include "pnmFileTypeRegistry.h" #include "indent.h" #include "dSearchPath.h" @@ -96,9 +91,6 @@ static ConfigVariableBool use_terminal_width //////////////////////////////////////////////////////////////////// ProgramBase:: ProgramBase() { - // A call to pystub() to force libpystub.so to be linked in. - pystub(); - // Set up Notify to write output to our own formatted stream. Notify::ptr()->set_ostream_ptr(new WordWrapStream(this), true); diff --git a/pandatool/src/progbase/test_prog.cxx b/pandatool/src/progbase/test_prog.cxx index 8851efa220..87d7c9f2dc 100644 --- a/pandatool/src/progbase/test_prog.cxx +++ b/pandatool/src/progbase/test_prog.cxx @@ -19,6 +19,7 @@ #include "programBase.h" #include "pnotify.h" +#include "pystub.h" class TestProgram : public ProgramBase { public: @@ -62,6 +63,9 @@ TestProgram() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + TestProgram t; t.parse_command_line(argc, argv); diff --git a/pandatool/src/softprogs/softCVS.cxx b/pandatool/src/softprogs/softCVS.cxx index f4048f05c3..73fe2b401d 100644 --- a/pandatool/src/softprogs/softCVS.cxx +++ b/pandatool/src/softprogs/softCVS.cxx @@ -20,6 +20,7 @@ #include "pnotify.h" #include "multifile.h" +#include "pystub.h" #include @@ -619,6 +620,9 @@ cvs_add_or_remove(const string &cvs_command, const vector_string &paths) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + SoftCVS prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/text-stats/textStats.cxx b/pandatool/src/text-stats/textStats.cxx index ca3470cc93..12ab444264 100644 --- a/pandatool/src/text-stats/textStats.cxx +++ b/pandatool/src/text-stats/textStats.cxx @@ -21,6 +21,7 @@ #include "pStatServer.h" #include "config_pstats.h" +#include "pystub.h" #include @@ -89,6 +90,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + TextStats prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/vrml/vrml2egg.cxx b/pandatool/src/vrml/vrml2egg.cxx deleted file mode 100644 index d5e13693f2..0000000000 --- a/pandatool/src/vrml/vrml2egg.cxx +++ /dev/null @@ -1,436 +0,0 @@ -// Filename: vrml2egg.C -// Created by: drose (24Jun99) -// -//////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97 Walt Disney Imagineering, Inc. -// -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. -//////////////////////////////////////////////////////////////////// - -#include "vrml2egg.h" -#include "parse_vrml.h" -#include "vrmlNode.h" -#include "appearance.h" -#include "indexedFaceSet.h" -#include "y.tab.h" - -#include -#include - -static const double pi = 4.0 * atan(1.0); - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::Help -// Access: Public, Virtual -// Description: Displays the "what is this program" message, along -// with the usage message. Should be overridden in base -// classes to describe the current program. -//////////////////////////////////////////////////////////////////// -void MainProgram:: -Help() { - cerr << - "\n" - "vrml2egg converts VRML 2.0 files (with the .wrl extension) to egg format.\n" - "A reasonable subset of the VRML standard is supported, including polygons,\n" - "colors, normals, textures, and hierarchy.\n"; - - Usage(); -} - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::Usage -// Access: Public, Virtual -// Description: Displays the usage message. -//////////////////////////////////////////////////////////////////// -void MainProgram:: -Usage() { - cerr << "\nUsage:\n" - << _commandName << " [opts] input.wrl\n\n" - - << "Options:\n"; - - ShowOpts(); - cerr << "\n"; -} - - - - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::ShowOpts -// Access: Public, Virtual -// Description: Displays the valid options. Should be extended in -// base classes to show additional options relevant to -// the current program. -//////////////////////////////////////////////////////////////////// -void MainProgram:: -ShowOpts() { - EggBase::ShowOpts(); -} - - - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::HandleGetopts -// Access: Public, Virtual -// Description: -//////////////////////////////////////////////////////////////////// -boolean MainProgram:: -HandleGetopts(char flag, char *optarg, int &optind, - int argc, char **argv) { - bool okflag = true; - - switch (flag) { - default: - okflag = EggBase::HandleGetopts(flag, optarg, optind, argc, argv); - } - - return okflag; -} - - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::HandleArgs -// Access: Public -// Description: Called by EggBase::CommandLine() to do the right -// thing with the arguments after the switches. -//////////////////////////////////////////////////////////////////// -boolean MainProgram:: -HandleArgs(int &argc, char **&argv) { - if (argc != 2) { - cerr << "VRML file name required.\n"; - return false; - } - - _filename = argv[1]; - - return EggBase::HandleArgs(argc, argv); -} - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::vrml_group -// Access: Public -// Description: Creates an Egg group corresponding to the VRML group. -//////////////////////////////////////////////////////////////////// -void MainProgram:: -vrml_group(const VrmlNode *node, EggGroup *group, - const pfMatrix &net_transform) { - const MFArray *children = node->get_value("children")._mf; - MFArray::const_iterator ci; - for (ci = children->begin(); ci != children->end(); ++ci) { - vrml_node((*ci)._sfnode, group, net_transform); - } -} - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::vrml_transform -// Access: Public -// Description: Creates an Egg group with a transform corresponding -// to the VRML group. -//////////////////////////////////////////////////////////////////// -void MainProgram:: -vrml_transform(const VrmlNode *node, EggGroup *group, - const pfMatrix &net_transform) { - const double *scale = node->get_value("scale")._sfvec; - const double *rotation = node->get_value("rotation")._sfvec; - const double *translation = node->get_value("translation")._sfvec; - - const double *center = node->get_value("center")._sfvec; - const double *o = node->get_value("scaleOrientation")._sfvec; - - pfMatrix local_transform; - local_transform.makeIdent(); - - boolean any_transform = false; - - if (scale[0] != 1.0 || scale[1] != 1.0 || scale[2] != 1.0) { - any_transform = true; - if (center[0] != 0.0 || center[1] != 0.0 || center[2] != 0.0) { - local_transform.postTrans(local_transform, - -center[0], -center[1], -center[2]); - if (o[3] != 0.0) { - local_transform.postRot(local_transform, - -o[3] * 180.0 / pi, o[0], o[1], o[2]); - local_transform.postScale(local_transform, - scale[0], scale[1], scale[2]); - local_transform.postRot(local_transform, - o[3] * 180.0 / pi, o[0], o[1], o[2]); - } else { - local_transform.postScale(local_transform, - scale[0], scale[1], scale[2]); - } - local_transform.postTrans(local_transform, - center[0], center[1], center[2]); - } else { - if (o[3] != 0.0) { - local_transform.postRot(local_transform, - -o[3] * 180.0 / pi, o[0], o[1], o[2]); - local_transform.postScale(local_transform, - scale[0], scale[1], scale[2]); - local_transform.postRot(local_transform, - o[3] * 180.0 / pi, o[0], o[1], o[2]); - } else { - local_transform.postScale(local_transform, - scale[0], scale[1], scale[2]); - } - } - } - - if (rotation[3] != 0.0) { - any_transform = true; - if (center[0] != 0.0 || center[1] != 0.0 || center[2] != 0.0) { - local_transform.postTrans(local_transform, - -center[0], -center[1], -center[2]); - local_transform.postRot(local_transform, - rotation[3] * 180.0 / pi, - rotation[0], rotation[1], rotation[2]); - local_transform.postTrans(local_transform, - center[0], center[1], center[2]); - - } else { - local_transform.postRot(local_transform, - rotation[3] * 180.0 / pi, - rotation[0], rotation[1], rotation[2]); - } - } - - if (translation[0] != 0.0 || - translation[1] != 0.0 || - translation[2] != 0.0) { - any_transform = true; - local_transform.postTrans(local_transform, - translation[0], - translation[1], - translation[2]); - } - - if (any_transform) { - group->transform = local_transform; - group->flags |= EF_TRANSFORM; - } - - pfMatrix next_transform = local_transform * net_transform; - - const MFArray *children = node->get_value("children")._mf; - MFArray::const_iterator ci; - for (ci = children->begin(); ci != children->end(); ++ci) { - vrml_node((*ci)._sfnode, group, next_transform); - } -} - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::vrml_shape -// Access: Public -// Description: Creates an Egg group corresponding a VRML shape. -// This will probably contain a vertex pool and a number -// of polygons. -//////////////////////////////////////////////////////////////////// -void MainProgram:: -vrml_shape(const VrmlNode *node, EggGroup *group, - const pfMatrix &net_transform) { - const VrmlNode *geometry = node->get_value("geometry")._sfnode._p; - - double transparency = 0.0; - - if (geometry != NULL) { - Appearance appearance - (node->get_value("appearance")._sfnode._p, _data); - - if (strcmp(geometry->_type->getName(), "IndexedFaceSet") == 0) { - IndexedFaceSet ifs(geometry, appearance, _data); - ifs.convert_to_egg(group, net_transform); - } else { - cerr << "Ignoring " << geometry->_type->getName() << "\n"; - } - } -} - - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::vrml_grouping_node -// Access: Public -// Description: Begins initial processing of a grouping-type node; -// that is, any node (like Group, Transform, or Shape) -// that maps to a or in egg. This -// create the group and does any instance-munging -// necessary, then calls the indicated method with the -// new parameters. -//////////////////////////////////////////////////////////////////// -void MainProgram:: -vrml_grouping_node(const SFNodeRef &vrml, EggGroup *egg, - const pfMatrix &net_transform, - void (MainProgram::*process_func) - (const VrmlNode *node, EggGroup *group, - const pfMatrix &net_transform)) { - const VrmlNode *node = vrml._p; - assert(node != NULL); - const char *name = vrml._name; - - if (vrml._type == SFNodeRef::T_use) { - // If this is an instancing reference, just add the reference and - // return; no need for further processing on the node. - Instances::const_iterator fi = _instances.find(node); - assert(fi != _instances.end()); - EggInstance *inst = _data.CreateInstance(egg); - inst->AddGroupRef((*fi).second); - return; - } - - EggGroup *group; - pfMatrix next_transform; - - if (node->_use_count > 0) { - // If this node is referenced one or more times later in the file, - // we must make it an instance node. - group = _data.CreateInstance(egg, name); - next_transform.makeIdent(); - - // And define the instance for future references. - _instances[node] = group; - - } else { - group = _data.CreateGroup(egg, name); - next_transform = net_transform; - } - - (this->*process_func)(node, group, next_transform); -} - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::vrml_node -// Access: Public -// Description: Processes a single VRML node, converting it to egg -// and adding it to the egg file, if appropriate, or -// doing whatever else should be done. -//////////////////////////////////////////////////////////////////// -void MainProgram:: -vrml_node(const SFNodeRef &vrml, EggGroup *egg, - const pfMatrix &net_transform) { - const VrmlNode *node = vrml._p; - if (node != NULL) { - // Now add it to the egg file at this point. - if (strcmp(node->_type->getName(), "Group") == 0) { - vrml_grouping_node(vrml, egg, net_transform, &vrml_group); - } else if (strcmp(node->_type->getName(), "Transform") == 0) { - vrml_grouping_node(vrml, egg, net_transform, &vrml_transform); - } else if (strcmp(node->_type->getName(), "Shape") == 0) { - vrml_grouping_node(vrml, egg, net_transform, &vrml_shape); - } - } -} - - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::get_all_defs -// Access: Public -// Description: Makes a first pass through the VRML hierarchy, -// identifying all nodes marked with a DEF code, and -// also counting the times each one is referenced by -// USE. Later, we'll need this information: if a node -// is referenced at least once, we need to define it as -// an instance node. -//////////////////////////////////////////////////////////////////// -void MainProgram:: -get_all_defs(SFNodeRef &vrml, MainProgram::Nodes &nodes) { - Nodes::iterator ni; - - switch (vrml._type) { - case SFNodeRef::T_def: - // If this is a node definition, add it to the map. - assert(vrml._name != NULL); - assert(vrml._p != NULL); - /* - This happens too often to bother yelling about it. - ni = nodes.find(vrml._name); - if (ni != nodes.end()) { - cerr << "Warning: node name " << vrml._name - << " appears multiple times.\n"; - } - */ - nodes[vrml._name] = vrml._p; - break; - - case SFNodeRef::T_use: - // If it's a reference, resolve it. - assert(vrml._name != NULL); - ni = nodes.find(vrml._name); - if (ni == nodes.end()) { - cerr << "Unknown node reference: " << vrml._name << "\n"; - } else { - // Increment the use count of the node. - (*ni).second->_use_count++; - - // Store the pointer itself in the reference, so we don't have - // to do this again later. - vrml._p = (*ni).second; - } - return; - } - - VrmlNode *node = vrml._p; - if (node != NULL) { - VrmlNode::Fields::iterator fi; - for (fi = node->_fields.begin(); fi != node->_fields.end(); ++fi) { - if ((*fi)._type->type == SFNODE) { - get_all_defs((*fi)._value._sfnode, nodes); - } else if ((*fi)._type->type == MFNODE) { - MFArray *children = (*fi)._value._mf; - MFArray::iterator ci; - for (ci = children->begin(); ci != children->end(); ++ci) { - get_all_defs((*ci)._sfnode, nodes); - } - } - } - } -} - -//////////////////////////////////////////////////////////////////// -// Function: MainProgram::DoIt -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -void MainProgram:: -DoIt() { - VrmlScene *scene = parse_vrml(_filename.c_str()); - if (scene != NULL) { - // First, resolve all the DEF/USE references, and count the number - // of times each node is USEd. - Nodes nodes; - VrmlScene::iterator si; - for (si = scene->begin(); si != scene->end(); ++si) { - get_all_defs((*si)._node, nodes); - } - - // Now go through the hierarchy again, and this time actually - // build the egg structure. - pfMatrix ident; - ident.makeIdent(); - - VrmlScene::const_iterator csi; - for (csi = scene->begin(); csi != scene->end(); ++csi) { - vrml_node((*csi)._node, &_data.root_group, ident); - } - - _data.UniquifyNames(); - Output() << _data << "\n"; - } -} - - -int -main(int argc, char *argv[]) { - pfInitArenas(); - - MainProgram prog; - - if (prog.CommandLine(argc, argv)) { - prog.DoIt(); - return 0; - } - return 1; -} diff --git a/pandatool/src/vrml/vrml2egg.h b/pandatool/src/vrml/vrml2egg.h deleted file mode 100644 index 7b46882c42..0000000000 --- a/pandatool/src/vrml/vrml2egg.h +++ /dev/null @@ -1,78 +0,0 @@ -// Filename: vrml2egg.h -// Created by: drose (24Jun99) -// -//////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97 Walt Disney Imagineering, Inc. -// -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. -//////////////////////////////////////////////////////////////////// - -#ifndef VRML2EGG_H -#define VRML2EGG_H - -#include - -#include -#include - -class VrmlNode; -struct SFNodeRef; -class EggGroup; -class pfMatrix; - -//////////////////////////////////////////////////////////////////// -// Class : MainProgram -// Description : The vrml2egg program class. This handles the user -// input and gets things going. -//////////////////////////////////////////////////////////////////// -class MainProgram : public EggBase { -public: - MainProgram() : EggBase("") { - } - - virtual void Help(); - virtual void Usage(); - virtual void ShowOpts(); - - virtual boolean - HandleGetopts(char flag, char *optarg, int &optind, - int argc, char **argv); - - virtual boolean - HandleArgs(int &argc, char **&argv); - - void vrml_group(const VrmlNode *node, EggGroup *group, - const pfMatrix &net_transform); - void vrml_transform(const VrmlNode *node, EggGroup *group, - const pfMatrix &net_transform); - void vrml_shape(const VrmlNode *node, EggGroup *group, - const pfMatrix &net_transform); - - void vrml_grouping_node(const SFNodeRef &vrml, EggGroup *egg, - const pfMatrix &net_transform, - void (MainProgram::*process_func) - (const VrmlNode *node, EggGroup *group, - const pfMatrix &net_transform)); - - void vrml_node(const SFNodeRef &vrml, - EggGroup *egg, const pfMatrix &net_transform); - - typedef map Nodes; - - void get_all_defs(SFNodeRef &vrml, Nodes &nodes); - - void DoIt(); - - typedef map Instances; - Instances _instances; - - string _filename; -}; - - -#endif diff --git a/pandatool/src/vrmlprogs/vrmlToEgg.cxx b/pandatool/src/vrmlprogs/vrmlToEgg.cxx index 8a6fa0ba16..633bd3de19 100644 --- a/pandatool/src/vrmlprogs/vrmlToEgg.cxx +++ b/pandatool/src/vrmlprogs/vrmlToEgg.cxx @@ -19,6 +19,7 @@ #include "vrmlToEgg.h" #include "vrmlToEggConverter.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: VRMLToEgg::Constructor @@ -73,6 +74,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + VRMLToEgg prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/vrmlprogs/vrmlTrans.cxx b/pandatool/src/vrmlprogs/vrmlTrans.cxx index b6b51bf659..8cbcd80d41 100644 --- a/pandatool/src/vrmlprogs/vrmlTrans.cxx +++ b/pandatool/src/vrmlprogs/vrmlTrans.cxx @@ -18,6 +18,7 @@ #include "vrmlTrans.h" #include "parse_vrml.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: VRMLTrans::Constructor @@ -97,6 +98,9 @@ handle_args(ProgramBase::Args &args) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + VRMLTrans prog; prog.parse_command_line(argc, argv); prog.run(); diff --git a/pandatool/src/win-stats/winStats.cxx b/pandatool/src/win-stats/winStats.cxx index 6f2c9fed57..1239421eb2 100644 --- a/pandatool/src/win-stats/winStats.cxx +++ b/pandatool/src/win-stats/winStats.cxx @@ -20,6 +20,7 @@ #include "winStatsServer.h" #include "config_pstats.h" +#include "pystub.h" #include diff --git a/pandatool/src/xfileprogs/eggToX.cxx b/pandatool/src/xfileprogs/eggToX.cxx index 24a7a88966..8980b811fd 100644 --- a/pandatool/src/xfileprogs/eggToX.cxx +++ b/pandatool/src/xfileprogs/eggToX.cxx @@ -18,6 +18,7 @@ #include "eggToX.h" #include "config_xfile.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: EggToX::Constructor @@ -77,6 +78,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + init_libxfile(); EggToX prog; prog.parse_command_line(argc, argv); diff --git a/pandatool/src/xfileprogs/xFileToEgg.cxx b/pandatool/src/xfileprogs/xFileToEgg.cxx index 2a80eff3ca..13a48379df 100644 --- a/pandatool/src/xfileprogs/xFileToEgg.cxx +++ b/pandatool/src/xfileprogs/xFileToEgg.cxx @@ -19,6 +19,7 @@ #include "xFileToEgg.h" #include "xFileToEggConverter.h" #include "config_xfile.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: XFileToEgg::Constructor @@ -122,6 +123,9 @@ run() { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + init_libxfile(); XFileToEgg prog; prog.parse_command_line(argc, argv); diff --git a/pandatool/src/xfileprogs/xFileTrans.cxx b/pandatool/src/xfileprogs/xFileTrans.cxx index e589092cbd..8f4e6b6834 100644 --- a/pandatool/src/xfileprogs/xFileTrans.cxx +++ b/pandatool/src/xfileprogs/xFileTrans.cxx @@ -18,6 +18,7 @@ #include "xFileTrans.h" #include "xFile.h" +#include "pystub.h" //////////////////////////////////////////////////////////////////// // Function: XFileTrans::Constructor @@ -99,6 +100,9 @@ handle_args(ProgramBase::Args &args) { int main(int argc, char *argv[]) { + // A call to pystub() to force libpystub.so to be linked in. + pystub(); + XFileTrans prog; prog.parse_command_line(argc, argv); prog.run();