简体   繁体   English

在Fedora 20 x86_64上编译32位linux应用程序时使用sndfile库

[英]using sndfile library when compiling 32bit linux application on Fedora 20 x86_64

I'm currently using Fedora 20 x86_64. 我目前正在使用Fedora 20 x86_64。 I've built libsndfile with these commands: 我用以下命令构建了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. 一切顺利,我可以在/ usr / local / lib中找到编译的库。 I want to use this in an application that will be built in 32bit. 我想在将以32位构建的应用程序中使用它。 The problem occurs when I try to compile that application. 当我尝试编译该应用程序时,会出现问题。 I get the following error: 我收到以下错误:

/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. “跳过不兼容”可能表明在编译sndfile时我做错了什么,但是由于我是新手,所以找不到它。 I tried different configurations but they all have the same result. 我尝试了不同的配置,但是它们都具有相同的结果。

If this needs more code or something, let me know what you need. 如果这需要更多代码或其他内容,请告诉我您需要什么。

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. 通常,可能没有符号链接,因为没有安装'-devel'库。 That is why 这就是为什么

sudo yum install libsndfile-devel.*

fixed it for me. 为我修复它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在x86_64芯片(64位服务器)上运行的C ++ unix 32位到Red Hat Linux - C++ unix 32bit to Red Hat Linux running on an x86_64 chip (64-bit server) 如何在64位x86环境中编译32位x86应用程序? - How to compile 32bit x86 application in 64bit x86 environment? 是什么决定了在64位机器上构建的32位库是否需要x86_64或i386依赖? - What determines if a 32-bit library built on a 64-bit machine needs x86_64 or i386 dependencies? 编译时,架构x86_64的未定义符号出错 - Undefined symbols for architecture x86_64 error when compiling 编译时x86_64的未定义符号 - Undefined symbols for x86_64 when compiling 32 位 x86 上的 64 位 int 算术(来自 c ) - 64 bit int arthimetic on 32bit x86 (from c ) 基于 CentOS 6 x64 构建的 32 位版本的应用程序在 `dl_iterate_phdr` 中的异常期间崩溃,当在较新的 Linux 上启动时 - A 32bit version of an application, built on CentOS 6 x64, crashes during exceptions in `dl_iterate_phdr`, when started on newer Linux 使用gcc 32位作为-m64的64位程序进行编译 - compiling using gcc 32bit, as a 64 bit program with -m64 在Xcode项目中使用C / C ++库时,找不到体系结构x86_64的符号 - Symbol(s) not found for architecture x86_64 when using C/C++ library in Xcode project 在x86_64 linux系统上构建x86 ImageMagick应用程序 - Build x86 ImageMagick application on x86_64 linux system
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM