root@beaglebone:~/exploringBB/chp09/LCDcharacter# cat $SLOTS|grep SPI
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-SPIDEV1
root@beaglebone:~/exploringBB/chp09/LCDcharacter# ./build
root@beaglebone:~/exploringBB/chp09/LCDcharacter# ./LCDApp
./LCDApp: error while loading shared libraries: libEBBLibrary.so: cannot open shared object file: No such file or directory
root@beaglebone:~/exploringBB/chp09/LCDcharacter# g++ LCDApp.cpp ../../library/libEBBLibrary.so -o LCDApp -I "../../library"
root@beaglebone:~/exploringBB/chp09/LCDcharacter# ./LCDApp
./LCDApp: error while loading shared libraries: libEBBLibrary.so: cannot open shared object file: No such file or directory
root@beaglebone:~/exploringBB/chp09/LCDcharacter# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
root@beaglebone:~/exploringBB/chp09/LCDcharacter# export LD_LIBRARY_PATH="../../library/libEBBLibrary.so:$LD_LIBRARY_PATH"
root@beaglebone:~/exploringBB/chp09/LCDcharacter# ./LCDApp
./LCDApp: error while loading shared libraries: libEBBLibrary.so: cannot open shared object file: No such file or directory
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Also, using LD_LIBRARY_PATH in this manner is just flat out wrong. If you have a shared library file, put it in the correct directory to begin with.
On Mon, Jan 18, 2016 at 6:24 PM, Mike <belly...@gmail.com> wrote:
root@beaglebone:~/exploringBB/chp09/LCDcharacter# export LD_LIBRARY_PATH="../../library/libEBBLibrary.so:$LD_LIBRARY_PATH"
root@beaglebone:~/exploringBB/chp09/LCDcharacter# ./LCDApp
./LCDApp: error while loading shared libraries: libEBBLibrary.so: cannot open shared object file: No such file or directory
I don't believe that LD_LIBRARY_PATH is searched in the manner you're thinking in the last lines. If memory serves you need to specify the full path from / i.e. absolute not relative.
Mike
root@beaglebone:~/exploringBB/chp09/LCDcharacter# export LD_LIBRARY_PATH="~/exploringBB/library/libEBBLibrary.so:$LD_LIBRARY_PATH"
root@beaglebone:~/exploringBB/chp09/LCDcharacter# ./LCDApp
./LCDApp: error while loading shared libraries: libEBBLibrary.so: cannot open shared object file: No such file or directory
root@beaglebone:~/exploringBB/chp09/LCDcharacter# cd ../../library
root@beaglebone:~/exploringBB/library# ls
CMakeLists.txt README build bus display docs example gpio libEBBLibrary.a libEBBLibrary.so motor network sensor
root@beaglebone:~/exploringBB/library#
Here is the code ...
#include <unistd.h>
Why do you think it's wrong? The point of LD_LIBRARY_PATH is to
collect all the places you might have shared libs, whether system or
application or private.
Because it's wrong. LD_LIBRARY_PATH is executation time, not link time. Link time is -L /path/to/lib( gcc / g++ )