# Calling NAG Library Routines from Scilab

## Calling NAG Library Routines from Scilab

### Troubleshooting:

• Be aware that if you have backup copies of any of your files as created by the emacs text editor, with names such as interface.c.~1~, Scilab may use these backup copies in preference to the proper files. If the backup file (an old version of the main file) contains incorrect code, then of course it may not compile, leading to error messages from Scilab. Worse, it may compile but not implement the routine you thought it would. Examine all messages from Scilab carefully when executing the build script to ensure the files you expected are being used. If necessary, remove offending backups and try again.
• If you are attempting to link to an external shared library, and that library further depends on other shared libraries, you may see a message similar to this:
  Link failed for dynamic library '/fserver/nagprod/CL08/cll6a08dgl/acml/libnagc_acml.so'.
An error occurred: libacml.so: cannot open shared object file: No such file or directory


In this case you may need to set an environment variable to tell the system where to look to find shared libraries. The environment variable name is operating-system dependent. On Linux machines it is named LD_LIBRARY_PATH, and is a colon-separated list of directories to be searched for libacml.so. For example, if you use the C shell, the command