On 24/06/14 17:41, Paolo Orsini wrote:
Thanks for sll your help,

Adding explicitly the path to the libraries as suggested by Andreas I was able to compile tutorial 1 externally.

This the build command I used

g++ -std=c++11 -o mytest tutorial1.cpp /home/paolo/OPM/opm-core/build/lib/libopmcore.a /home/paolo/OPM/opm-parser/build/lib/x86_64-linux-gnu/libParser.a /home/paolo/OPM/ert/ert/devel/lib/x86_64-linux-gnu/libecl.so

However when running mytest I got the following error:

./mytest: error while loading shared libraries: libecl.so.1.0: cannot open shared object file: No such file or directory

Still some issue with linking...
yes, that's what happens when you take bad advice :> (joke, andreas!)

you can make it work this way by doing

LD_LIBRARY_PATH=/home/paolo/OPM/ert/ert/devel/lib/x86_64-linux-gnu ./mytest

you are linking to a shared library outside system paths. LD_LIBRARY_PATH adds a path for the linker to look in.

never use shared libs from a build tree. either recompile your ert static, or install it on the system level and link with -lecl

(sorry for the dupe paolo, forgot to cc the list..)
_______________________________________________
Opm mailing list
[email protected]
http://www.opm-project.org/mailman/listinfo/opm

Reply via email to