00001 // Filename: pystub.h 00002 // Created by: drose (08Aug00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PYSTUB_H 00016 #define PYSTUB_H 00017 00018 #include "dtoolbase.h" 00019 00020 // The sole purpose of this header file is to allow a program other 00021 // than Python to load in a module that includes Python wrappers. 00022 00023 // We need this if we build the Panda libraries with Python wrappers, 00024 // but want to run a standalone program with those libraries. 00025 00026 // This header file just stubs out the Python functions that these 00027 // wrappers will call. You should include this header file in exactly 00028 // one .C file in your project, preferably in the .C file that defines 00029 // main(), and then link with -lpystub. Do not include this header 00030 // file in a .C or .h file that will become part of an .so that might 00031 // eventually link with Python. 00032 00033 00034 // You might need to call this function in main() or somewhere to 00035 // force the .so to be linked in--some OS'es try to be smart about not 00036 // pulling in shared libraries whose symbols aren't referenced 00037 // anywhere. 00038 EXPCL_DTOOLCONFIG void pystub(); 00039 00040 00041 #endif 00042