简体   繁体   中英

Compiling problems with shared libraries

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM