Next: Automated interface generation using SWIG, Previous: How the C interface works, Up: C Interface [Contents][Index]
open-lib ( c-addr1 u1 – c-addr2 ) gforth-0.4 “open-lib”
Open the (typically shared) library with the name given by
c-addr1 u1 and return the handle c-addr2 (to be used by
lib-sym).
lib-sym ( c-addr1 u1 c-addr2 – c-addr3 ) gforth-0.4 “lib-sym”
C-addr3 is the address of the symbol c-addr1 u1 in the
library c_addr2 (opened with open-lib). If the library
does not contain the symbol, c-addr3 is 0.
lib-error ( – c-addr u ) gforth-0.7 “lib-error”
Error message for last failed open-lib or lib-sym.
call-c ( ... w – ... ) gforth-0.2 “call-c”
Call the C function pointed to by w. The C function has to access the stack itself. The stack pointers are exported into a ptrpair structure passed to the C function, and returned in that form.