[英]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. 我正在尝试在MacOSx上使用C ++的wavelet库( https://sourceforge.net/projects/wavelet2d/files/wavelib-0.4.0.0/ ),并且在使其工作方面遇到了麻烦。
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
. 该库文件在目录/usr/local/lib
名为'libwavelet2d.so.1'
。
Do you have any ideas? 你有什么想法?
You mention that you have libwavelet2d.so.1
in /usr/local/lib
, but not libwavelet2d.so
. 您提到在/usr/local/lib
有libwavelet2d.so.1
,但没有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
. 应该有一个符号链接/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. 在构建时,需要没有版本后缀( .1
)的文件。 At runtime, only the suffixed file will be referenced. 在运行时,仅后缀文件将被引用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.