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