Added descriptions of how to build dynamic loadable module.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4499 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f8e9fbd60e
commit
61ec2b6351
3 changed files with 42 additions and 6 deletions
|
|
@ -2,3 +2,18 @@ This example runs the entire gifplot.h header file through SWIG without
|
||||||
any changes. The Scheme program 'test-gifplot.scm' does something a
|
any changes. The Scheme program 'test-gifplot.scm' does something a
|
||||||
little more interesting. You'll have to go look at the header file to
|
little more interesting. You'll have to go look at the header file to
|
||||||
get a complete listing of the functions.
|
get a complete listing of the functions.
|
||||||
|
|
||||||
|
`make' will build a version of the CHICKEN interpreter which defines
|
||||||
|
an additional unit (gifplot). Run `./simple test-gifplot.scm' to test
|
||||||
|
it.
|
||||||
|
|
||||||
|
** If you have a platform that supports dynamic linking (most UNIXes
|
||||||
|
** and Win32), then you can run "make module". This will create a
|
||||||
|
** dynamic module called module.dll/module.so/module.shl (depending on
|
||||||
|
** your platform), which you can use with the following:
|
||||||
|
|
||||||
|
(load-library 'precsi "module.dll")
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
(load-library 'gifplot "module.dll")
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,17 @@ This is a very minimalistic example in which just a few functions
|
||||||
and constants from library are wrapped and used to draw some simple
|
and constants from library are wrapped and used to draw some simple
|
||||||
shapes.
|
shapes.
|
||||||
|
|
||||||
`make' will build a version of CHICKEN which defines an additional
|
`make' will build a version of the CHICKEN interpreter which defines
|
||||||
unit (simple). Run `./simple runme.scm' to test it.
|
an additional unit (simple). Run `./simple test-simple.scm' to test
|
||||||
|
it.
|
||||||
|
|
||||||
|
** If you have a platform that supports dynamic linking (most UNIXes
|
||||||
|
** and Win32), then you can run "make module". This will create a
|
||||||
|
** dynamic module called module.dll/module.so/module.shl (depending on
|
||||||
|
** your platform), which you can use with the following:
|
||||||
|
|
||||||
|
(load-library 'precsi "module.dll")
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
(load-library 'simple "module.dll")
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,17 @@ zlib -- a wrapping of the zlib compression library
|
||||||
|
|
||||||
Note that the examples in this directory build a special version of
|
Note that the examples in this directory build a special version of
|
||||||
the CHICKEN interpreter (statically linked) which includes the wrapped
|
the CHICKEN interpreter (statically linked) which includes the wrapped
|
||||||
functions in the top-level module.
|
functions in the top-level module. Just run "make" in any example
|
||||||
|
|
||||||
If you want to put the wrapped functions into your own module,
|
|
||||||
statically or dynamically linked, see the Examples/GIFPlot/Chicken
|
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
|
** If you have a platform that supports dynamic linking (most UNIXes
|
||||||
|
** and Win32), then you can run "make module" in any example
|
||||||
|
** directory. This will create a dynamic module called
|
||||||
|
** module.dll/module.so/module.shl (depending on your platform), which
|
||||||
|
** you can use with the following:
|
||||||
|
|
||||||
|
(load-library 'precsi "module.dll")
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
(load-library 'example "module.dll")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue