ExternalCalling - Maple Programming Help

Home : Support : Online Help : Programming : Calling External Routines : ExternalCalling : ExternalCalling/ExternalLibraryName

ExternalCalling

 ExternalLibraryName
 return the name of the relevant external shared object

 Calling Sequence ExternalLibraryName( basename, precision )

Parameters

 basename - string or name; denotes which library is relevant precision - optional HWFloat or SWFloat

Description

 • The ExternalLibraryName(basename) function returns the string that represents the name of the relevant external shared object (library) with the correct platform filename extension or polycapitalization.
 • The library name (Maple string) is platform dependent.  In Windows, the returned name has ".dll" appended to it.  In all other operating systems, the library name has "lib" prepended and ".so" appended to it.
 • If precision is set to SWFloat, the suffix "mp" is appended to the basename of the shared library.  This facilitates having hardware float and multi-precision software float libraries with the same base name.

Examples

 > $\mathrm{with}\left(\mathrm{ExternalCalling}\right):$
 > $\mathrm{extlib}≔\mathrm{ExternalLibraryName}\left("mstring"\right)$
 ${\mathrm{extlib}}{:=}{"libmstring.so"}$ (1)
 > $\mathrm{extcall}≔\mathrm{DefineExternal}\left('\mathrm{mstring_uppercase}',\mathrm{extlib}\right)$
 ${\mathrm{extcall}}{:=}{\mathbf{proc}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{option}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{call_external}}{,}{\mathrm{define_external}}{}\left({\mathrm{mstring_uppercase}}{,}{\mathrm{MAPLE}}{,}{\mathrm{LIB}}{=}{"libmstring.so"}\right){;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{call_external}}{}\left({0}{,}{140204696348208}{,}{\mathrm{true}}{,}{\mathrm{false}}{,}{\mathrm{args}}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (2)