Run files located in the bin folder

OpenJAUS Tips and Tricks

Q: I’m trying to run one of the files located in the bin folder but it gives me this message:
./BaseDemo: error while loading shared libraries: cannot open shared object file: No such file or directory
However, I can clearly see in the lib folder. Am I missing something? Or am I doing something wrong?

A: The issue is that you need to tell Linux where to find the library files for OpenJAUS. There’s a couple ways you can do this:

1. Some version of linux will let you copy the .so files into the bin directory and will do a side-by-side load similar to how Windows does it.
2. You can copy the files into the /usr/lib directory (“install them”) and run the ldconfig command to update your cache
3. You can run ldconfig with the “-n” option and provide the full path to the org.openjaus.sdk.cpp/lib directory and it will add it to the path.
4. You can make a conf file in the /etc/ folder with the path and it will be loaded automatically on boot-up

There’s a great reference on shared libraries in linux here: