Wednesday, July 30, 2014

cross-compile ncurses for ARM: ARMEL & ARMHF

First, make sure you have installed these packages:

sudo apt-get install gcc-arm-linux-gnueabihf
sudo apt-get install g++-arm-linux-gnueabihf
sudo apt-get install gcc-arm-linux-gnueabi
sudo apt-get install g++-arm-linux-gnueabi
Make sure you did the following command and that "gcc" is in your path
sudo apt-get install build-essential

Download ncurses:

Extract ncurses:
tar -xzf ncurses-5.9.tar.gz

Go to the folder:
cd ncurses-5.9

And build ncurses:
./configure --host=arm-linux-gnueabi --prefix=/usr/arm-linux-gnueabi CXX="arm-linux-gnueabi-g++"
./configure --host=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabihf CXX="arm-linux-gnueabihf-g++"
sudo make install


Then you should see libncurses.a with this command:
ls /usr/arm-linux-gnueabi/lib
ls /usr/arm-linux-gnueabihf/lib

1 comment:

Lợi Đặng said...

Hi friend, thank you so much. Your post is short but great.
Best Regards