ここにあるプログラムをコンパイルしていますが、実行時にエラーが発生します。
これをコンパイルするために私がすることは次のとおりです。
$ g++ -I/home/jpthomps/Desktop/pl-6.0.2/src main.cpp -L/usr/local/lib/swipl-6.0.2/lib/x86_64-linux -lswipl
main.cpp: In function ‘int main()’:
main.cpp:8:39: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
main.cpp:20:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
次に、コンパイルされたプログラムを実行しようとすると:
$ ./a.out
./a.out: error while loading shared libraries: libswipl.so.6.0.2: cannot open shared object file: No such file or directory
libswipl.so.6.0.2 ファイルの場所を伝えるために、.cpp ファイルに何かを追加する必要がありますか?