0

I try to compile some code, which works on my main-pc under ubuntu 14.04 LTS. Now I want to use a little board(Zedboard) with linux to control a EnOceanreceiver.
I use Linaro 12.11 and programm in C++.

If I compile, there is no error. But if I want to start the programm comes: error while loading shared libraries: libEOLink.so.0: cannot open shared object file: No such file or directory

My Makefile looks like:

all: EnOcean.cpp
   g++ -I/homelinaro/EOLink EnOcean.cpp -o EnOcean -L/usr/local/lib -lEOLink

I found the data under /usr/local/lib but it doesn't help if with or not.

Thanks for help!

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
knowless
  • 13
  • 6

1 Answers1

1

If libEOLink.so.0 can be found in /usr/local/lib, you shouldn't need to add it to LD_LIBRARY_PATH as this should already be part of the path. It's possible that library relies on other librari(es) that are not found. To determine whether this is the case, run:

ldd /usr/local/lib/libEOLink.so.0

If any dependencies are not found, it will be reported.

I also assume you combiled libEOLink for your target system.

Adam Leggett
  • 3,714
  • 30
  • 24
  • I got back: libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6e2e000) libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6dc2000) libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6cde000) /lib/ld-linux-armhf.so.3 (0xb6f19000) libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6cbc000) But I have this data. But what says the hex-number? /usr/lib/local/lib is in the LD_LIBRARY_PATH too. – knowless Apr 02 '15 at 18:25
  • That's the load address of the library, and isn't really important for your purposes. Just to verify, you did build libEOLink.so.0 for your target ARM architecture, right? – Adam Leggett Apr 02 '15 at 18:39
  • Hi, it works now. I tipped this again(I don't know if this was the solution) ->sudo sh -c 'echo SUBSYSTEMS==\"usb\", KERNEL==\"ttyUSB?\", ATTRS{interface}==\"EnOcean USB300 ??\",MODE=\"0666\", SYMLINK+=\"USB300\" > /etc/udev/rules.d/70-enocean-stick.rules' ->sudo /etc/init.d/udev restart ->sudo chmod 777 /dev/ttyUSB0 – knowless Apr 02 '15 at 19:25