我如何交叉编译为ARM /树莓派libsndfile [英] How do I cross-compile libsndfile for Arm/Raspberry Pi
问题描述
我试图让一个工作交叉编译器在Linux下运行(Debian的挤压AMD64),但我似乎无法给我的文件与已安装的 libsndfile
链接,我假设我需要交叉编译为目标的树莓丕源和链接到该版本。但我似乎无法找到关于做好 ./配置
和制作
舞台简单指令编译成目标。
I'm trying to get a working cross-compiler running under Linux (Debian squeeze amd64) but I can't seem to link my files with the installed libsndfile
, I'm assuming I need to cross-compile the source to target the Raspberry-Pi and link to that version. But I can't seem to find straightforward instructions on doing the ./configure
and make
stage to compile to the target.
注意:我按照下列步骤操作:如何构建一个GCC 4.7工具链交叉编译?,以获得交叉编译器构建并使用的Eclipse
Note: I followed these steps: How do I build a GCC 4.7 toolchain for cross-compiling? to get the cross compiler built and using Eclipse.
推荐答案
好吧,你想要做的是一些东西,你可能无法在Eclipse中做的。
Ok, what you want to do is something which you probably cannot do within Eclipse.
相反,你需要一个终端(例如xterm或GNOME终端)。在你需要沿着东西线运行配置脚本:
Instead you need a terminal (eg xterm or gnome-terminal). The you need to run the configure script with something along the lines of:
./配置 - preFIX = $ HOME /布防--build = i386的Linux的主机=手臂未知的Linux-gnueabi
观看配置输出,以确保配置脚本拿起正确的编译器,然后执行:
Watch the configure output to make sure that the configure script picks up the correct compiler and then do:
使&放大器;&安培;使安装
当你再想要建立别的东西,对手臂二进制代码链接,确保他们从 $拿到头HOME / ARM /包括
,并连接在图书馆 $ HOME / ARM / lib目录
。
When you then want to build something else that links against the Arm binaries, make sure they get the headers from $HOME/Arm/include
and link against the library in $HOME/Arm/lib
.
您应该能够找到大量的文件有关使用autoconf生成的净配置脚本交叉编译的东西。
You should be able to find lots of documentation about cross compiling stuff that uses autoconf generated configure scripts on the net.
这篇关于我如何交叉编译为ARM /树莓派libsndfile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!