Question

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.

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.

Was it helpful?

Solution

Ok, what you want to do is something which you probably cannot do within Eclipse.

Instead you need a terminal (eg xterm or gnome-terminal). The you need to run the configure script with something along the lines of:

./configure --prefix=$HOME/Arm --build=i386-linux --host=arm-unknown-linux-gnueabi

Watch the configure output to make sure that the configure script picks up the correct compiler and then do:

make && make install

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.

You should be able to find lots of documentation about cross compiling stuff that uses autoconf generated configure scripts on the net.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top