简体   繁体   中英

compilation error : library not found

I'm trying to use the wavelet libraries for c++ ( https://sourceforge.net/projects/wavelet2d/files/wavelib-0.4.0.0/ ) on my MacOSx and having hard trouble in making it work.

Here is my command line :

g++ -I /usr/local/include/wavelib -L /usr/local/lib -lwavelet2d testWavelib3.cpp -o testWavelib3

I get the following error :

library not found for -lwavelet2d

The library file is named 'libwavelet2d.so.1' in the directory /usr/local/lib .

Do you have any ideas?

You mention that you have libwavelet2d.so.1 in /usr/local/lib , but not libwavelet2d.so . Typically what this means is that you have installed the "runtime package" for this library but not the "development package". There should be a symlink /usr/local/lib/libwavelet2d.so -> libwavelet2d.so.1 .

You can make the symlink yourself to try it:

ln -s libwavelet2d.so.1 /usr/local/lib/libwavelet2d.so

At build time, the file without the version suffix ( .1 ) is required. At runtime, only the suffixed file will be referenced.

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