http://forum.lazarus-ide.org/index.php?topic=21972.0
Important notice:
After compilation of executable file you need to run following command in Terminal:
./install_nist_library.sh

Or you can do that manually according to instructions which are based on information in page:
https://wiki.lazarus.freepascal.org/macOS_Dynamic_Libraries
//
After creating an application bundle you need to:
//
1. Delete the nist_demo.app/Contents/MacOS/nist_demo symbolic link to the nist_demo executable file
2. Copy the nist_demo executable file into the nist_demo.app/Contents/MacOS directory
3. Copy libNIST_library_macOS_x86_64.dylib file into the nist_demo.app/Contents/MacOS directory
4. Open a Terminal (Applications > Utilities > Terminal)
5. Change into the nist_demo.app/Contents/MacOS directory:
cd nist_demo.app/Contents/MacOS
//
6. In Terminal enter command:
install_name_tool -change libNIST_library_macOS_x86_64.dylib "@executable_path/./libNIST_library_macOS_x86_64.dylib" nist_demo
//
This ensures that the nist_demo executable in your application bundle will look in correct directory to find your dynamic library.
                                                                                                                                      


