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

/trunk/Examples/README

#
#! | 47 lines | 32 code | 15 blank | 0 comment | 0 complexity | 580af468bab50416d49f4d9f253ad892 MD5 | raw file
 1SWIG Examples
 2
 3The "perl5", "python", "tcl", "guile", "java", "mzscheme", "ruby", and
 4"chicken" directories contain a number of simple examples that are
 5primarily used for testing. 
 6
 7The file 'index.html' is the top of a hyperlinked document that
 8contains information about all of the examples along with various
 9notes related to each example.
10
11The Examples directory is currently quite incomplete because it
12is being reorganized.  A more complete set of examples can be found
13in the SWIG1.1p5 distribution (most of which should still work with
14SWIG1.3).
15
16Note: All of the examples rely upon the Makefile in this directory.
17You may need to edit it to reflect the configuration of your machine
18in case the configure script guesses incorrect settings.
19
20
21*** Special note concering C++ ***
22
23The configure script is currently unable to handle all of the possible
24options for producing dynamically loadable C++ extensions.  Here are
25the rules of thumb for making C++ work:
26
27 -  Try using the C++ as the linker for the shared library.  For example:
28
29         g++ -shared $(OBJS) -o module.so
30
31 -  If that doesn't work, you may need to explicitly link against some
32    kind of C++ runtime library.  For example:
33
34         ld -G $(OBJS) -L/opt/SUNWspro/lib -lCrun -o module.so
35
36    This can be set by modifying the setting of CPP_DLLIBS in the
37    Makefile.
38
39
40*** Special note for SWIG Maintainers ***
41
42When you add an example, consider arranging for the example to be also
43useful as part of the SWIG testing framework.  To do this, include in
44the example makefile a target "check" ("check: all" is sufficient for a
45first pass), and add an invocation to ../Makefile.in under target
46"check-examples" (or whatever is appropriate).  Later, we can add or
47expand the actions under target "check" to do more in-depth testing.