I'm currently using Fedora 20 x86_64. I've built libsndfile with these commands:
我目前正在使用Fedora 20 x86_64。我用这些命令构建了libsndfile:
sudo ./configure BASE_FLAGS=-32
sudo make
sudo make install
This all goes well and I can find the compiled library in /usr/local/lib. I want to use this in an application that will be built in 32bit. The problem occurs when I try to compile that application. I get the following error:
这一切顺利,我可以在/ usr / local / lib中找到已编译的库。我想在一个将以32位构建的应用程序中使用它。当我尝试编译该应用程序时,会发生此问题。我收到以下错误:
/usr/bin/ld: skipping incompatible /builddir/Code/Platformer/../Dependencies/libsndfile/lib/Linux/libsndfile.so when searching for -lsndfile
/usr/bin/ld: skipping incompatible /builddir/Code/Platformer/../Dependencies/libsndfile/lib/Linux/libsndfile.a when searching for -lsndfile
/usr/bin/ld: cannot find -lsndfile
The "skipping incompatible" might suggest that I'm doing something wrong when compiling sndfile but since I'm kind of new to this I can't find what it is. I tried different configurations but they all have the same result.
“跳过不兼容”可能表明我在编译sndfile时做错了,但由于我对此有点新意,我找不到它是什么。我尝试了不同的配置,但它们都有相同的结果。
If this needs more code or something, let me know what you need.
如果需要更多代码或其他内容,请告诉我您的需求。
1 个解决方案
#1
For anyone with the same problem - try to look here:
对于有同样问题的人 - 试着看看这里:
ld cannot find an existing library
ld找不到现有的库
Generally there is probably a symlink missing, because the '-devel' library is not istalled. That is why
通常可能缺少符号链接,因为'-devel'库不是istalled。这就是为什么
sudo yum install libsndfile-devel.*
fixed it for me.
为我修好了。
#1
For anyone with the same problem - try to look here:
对于有同样问题的人 - 试着看看这里:
ld cannot find an existing library
ld找不到现有的库
Generally there is probably a symlink missing, because the '-devel' library is not istalled. That is why
通常可能缺少符号链接,因为'-devel'库不是istalled。这就是为什么
sudo yum install libsndfile-devel.*
fixed it for me.
为我修好了。