In PowerBuilder custom class user objects that you plan to deploy as EAServer components on a UNIX platform, you can call external functions in shared libraries compiled on the operating system where the server is running. You cannot call external functions in libraries that make Windows API calls or rely on graphical processing.
You use the standard PowerScript syntax to declare functions that reside in UNIX shared libraries. For example, this statement declares the function getcwd in the standard C library on Solaris:
FUNCTION string getcwd(REF string buff, &
unsigned int size) LIBRARY "/usr/lib/libc.so"
You call the function from a script in your application in the way you call any other function. In this example, the space function allocates enough space to hold the directory name returned by getcwd:
string ls_return, ls_directory
ls_directory = space(100)
. . .
ls_return = getcwd(ls_directory, 100)