Panda3D
pystub.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file pystub.h
10  * @author drose
11  * @date 2000-08-08
12  */
13 
14 #ifndef PYSTUB_H
15 #define PYSTUB_H
16 
17 #include "dtoolbase.h"
18 
19 // The sole purpose of this header file is to allow a program other than
20 // Python to load in a module that includes Python wrappers.
21 
22 // We need this if we build the Panda libraries with Python wrappers, but want
23 // to run a standalone program with those libraries.
24 
25 // This header file just stubs out the Python functions that these wrappers
26 // will call. You should include this header file in exactly one .C file in
27 // your project, preferably in the .C file that defines main(), and then link
28 // with -lpystub. Do not include this header file in a .C or .h file that
29 // will become part of an .so that might eventually link with Python.
30 
31 
32 // You might need to call this function in main() or somewhere to force the
33 // .so to be linked in--some OS'es try to be smart about not pulling in shared
34 // libraries whose symbols aren't referenced anywhere.
35 EXPCL_PYSTUB void pystub();
36 
37 
38 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.