Stable Numerics Subroutine Library
Installation and Users Guide
Version 1.1 DD-00005-001

3.1 Compiling against the Library (C/C++)

In order to use the product, the header search path of the C/C++ compiler needs to be set to include directory inside the distribution directory.

In order to link with the library the library search path needs to include the lib or lib64 directories inside the distribution directory and the application needs to be linked against the respective library used.

This can be accomplished as follows for the following compilers:

GNU C/C++ Compiler, LLVM clang/clang++, Portland Group Compiler, IBM XL C/C++


For the include search path use the -I flag, such as: -I/opt/adelsbach/snXY/include.
For the library search path use the -L flag, such as: -I/opt/adelsbach/snXY/lib or -I/opt/adelsbach/snXY/lib64 for 64bit systems.
For linking against libsn use the -l flag, such as: -lsn.

Microsoft Visual Studio


Right-click in your Solution Explorer and Select Properties.
Add the folder the distribution was extracted to under Additional Library Directories.
Add the library to link against under Linker -> Input -> Additional Dependencies.
Add the header file folder under C/C++ -> Additional Include Directories.