When attempting to run an application that depends on the OpenJAUS SDK libraries, the libraries must be installed in a location that can be found by the operating system. If the operating system cannot find the libraries then it will fail to execute the application.



Installing on Windows 


The recommended way to install the libraries is to copy them in the same directory as your final application executable.




Installing on Desktop Linux


Linux provides multiple options for installing libraries and as such OpenJAUS leaves the choice of installation method on the user as it could be different depending on their specific needs. For users less familiar with Linux we provide 3 installation options below but there may be other options available.



Option 1: Copy the libraries to /usr/lib


This is the easiest solution but can clutter the Linux system libraries and make it more difficult to uninstall the libraries. Note that the libraries will need to be copied to that location if they are changed otherwise the application could be running against the incorrect version of the libraries which can have unexpected results.



Option 2: Export the LD_LIBRARY_PATH variable


The locations of the libraries can be specified by adding their paths to the LD_LIBRARY_PATH variable such as:

export LD_LIBRARY_PATH={path to org.openjaus.sdk.cpp}\lib

where {path to org.openjaus.sdk.cpp} is the absolute path to the openjaus sdk project folder.


When using this option, the paths to all openjaus libraries must be specified. 


In addition, this command will need to be run for every new shell or the command can be added to the an appropriate shell startup script (~/.bashrc, /.profile, etc) to ensure that the libraries locations are always known.



Option 3: Add library paths to ld.so.conf.d


The locations of the libraries can be specified in a text file which is placed in the /etc/ld.so.conf.d/ folder. The text file must have a .conf extension and each location to be searched should be on a new line. The attached file is provided as an example. 


The library paths specified in this file will be automatically loaded on start up but can me manually loaded the first time by running:

sudo ldconfig


Note: root access is required to modify the /etc/ld.so.conf.d/ folder