Macaulay2 » Documentation
Packages » ForeignFunctions » ForeignObject » foreignSymbol
next | previous | forward | backward | up | index | toc

foreignSymbol -- get a foreign symbol

Description

This function is a wrapper around the C function dlsym. It loads a symbol from a shared library using the specified foreign type. If the shared library is already linked against Macaulay2, then it may be omitted.

i1 : foreignSymbol("errno", int)

o1 = 22

o1 : ForeignObject of type int32

Ways to use foreignSymbol:

  • foreignSymbol(SharedLibrary,String,ForeignType)
  • foreignSymbol(String,ForeignType)

For the programmer

The object foreignSymbol is a method function.


The source of this document is in ForeignFunctions.m2:1957:0.