Ncurses Library porting

Source: Internet
Author: User

Target board: ARM (i.mx286)

Host: ubuntu-13.10

Cross compiler: ARM-NONE-LINUX-GNUEABI-GCC

Ncurses Version: 5.9

Original link: Http://blog.csdn.net/fulinus


Ncurses Library: http://ftp.gnu.org/pub/gnu/ncurses/

Extract:

[Email protected] ~]$ tar xzf ncurses-5.9.tar.gz

[Email protected] ~]$ CD ncurses-5.9/


Compile:

[Email protected] ncurses-5.9]$/configure--prefix= $PWD/install--host=arm-none-linux-gnueabi--build=i686-- With-shared

[[email protected] ncurses-5.9]$ make && make install

At this point, the install directory is generated under the ncurses-5.9 directory, which contains the Ncurses library and header files:

[[email protected] ncurses-5.9]$ ls Install
Bin include Lib man share


Test:

In the test directory, we are testing the file, and we are going to download one of the files named rain to run in the Development Board:

[Email protected] ~$./rain
Error opening terminal:vt102.

If the above error occurs, on the target board:

[Email protected] ~$ mkdir-p/usr/share/terminfo/v/

The VT100 and vt102 in the ncurses-5.9/install/share/terminfo/v/directory are downloaded to the/usr/share/terminfo/v/directory of the target board.

Set Environment parameters:

[Email protected] ~ $export term=vt100

[Email protected] ~ $export terminfo=/usr/share/terminfo

Rain can be seen when running rain again:

[Email protected] ~$./rain


If you want to have a color effect:

[Email protected] ~$ mkdir-p/usr/share/terminfo/l/

and download Linux from the ncurses-5.9/install/share/terminfo/l/directory to the/usr/share/terminfo/l/directory of the target board.

Set Environment parameters:

[Email protected] ~ $export Term=linux

[Email protected] ~ $export terminfo=/usr/share/terminfo

Running rain programs has a color effect.


To avoid setting the environment parameters for each restart, you can add them to the/etc/profile file in the target board:

Export Term=linux

Export terminfo=/usr/share/terminfo














Ncurses Library porting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.