I've compiled and run $ sudo make install and the files were installed under /usr/local/lib in Ubuntu 16.04:
drwxr-xr-x 5 root root 4.0K Jul 27 13:22 .
drwxr-xr-x 10 root root 4.0K Aug 1 2017 ..
-rw-r--r-- 1 root root 543K Jul 27 13:22 libsecp256k1.a
-rwxr-xr-x 1 root root 968 Jul 27 13:22 libsecp256k1.la
lrwxrwxrwx 1 root root 21 Jul 27 13:22 libsecp256k1.so -> libsecp256k1.so.0.0.0
lrwxrwxrwx 1 root root 21 Jul 27 13:22 libsecp256k1.so.0 -> libsecp256k1.so.0.0.0
-rwxr-xr-x 1 root root 414K Jul 27 13:22 libsecp256k1.so.0.0.0
Then, I included the library in my project:
g++ -std=c++11 -Wall -g -I./src -o bin/btc_wallet_tests tests/runner.cpp build/keypair_tests.o build/key.o -L./lib -L/usr/local/lib -lboost_unit_test_framework -lsecp256k1
But, when I run the final binary, it says
error while loading shared libraries: libsecp256k1.so.0: cannot open shared object file: No such file or directory
I finally got it working, but I had to do:
$ LD_LIBRARY_PATH=/usr/local/lib
$ export LD_LIBRARY_PATH
Is this a non-standard installation location? Just wondering if this is something on my end or in the autotools scripts that might need to be adjusted?