PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/python/import/README

#
#! | 39 lines | 30 code | 9 blank | 0 comment | 0 complexity | a9fce398a408f7c14a8d4fe6d13b3c3f MD5 | raw file
 1This example tests the %import directive and working with multiple modules.
 2
 3Use 'python runme.py' to run a test.
 4
 5Overview:
 6---------
 7
 8The example defines 4 different extension modules--each wrapping
 9a separate C++ class.
10
11     base.i     -  Base class
12     foo.i      -  Foo class derived from Base
13     bar.i      -  Bar class derived from Base
14     spam.i     -  Spam class derived from Bar
15
16Each module uses %import to refer to another module.  For
17example, the 'foo.i' module uses '%import base.i' to get
18definitions for its base class.
19
20If everything is okay, all of the modules will load properly and
21type checking will work correctly. Caveat: Some compilers, for example
22gcc-3.2.x, generate broken vtables with the inline methods in this test.
23This is not a SWIG problem and can usually be solved with non-inlined
24destructors compiled into separate shared objects/DLLs.
25
26Unix:
27-----
28- Run make
29- Run the test as described above
30
31Windows:
32--------
33- Use the Visual C++ 6 workspace file (example.dsw). Build the runtime
34  project DLL first followed by the other 4 DLLs as they all have a
35  dependency on the runtime DLL. The Batch build option in the Build menu
36  is usually the easiest way to do this. Only use the Release builds not
37  the Debug builds.
38- Run the test as described above
39