Crossing, they are. What we are going to say today. is a little supplement to the previous content, the detailed content is: Installs the curses development package. To build
Development environment. The gossip Hugh said, the words return to the positive turn.
We said in the previous building development environment content, mainly said the development environment of GCC and vim, today we will say how to build the development environment
Another tool in: curses.
Curses is a graphics library on Linux. Just the mint we used only installed the library file. The header file associated with the library is not installed.
Didn't
With these headers, it is not possible to develop related work. So, suppose we want to use Linux to develop some simple graphics software,
To install the associated header file, the following is the specific installation process:
1. Assume that you are familiar with the Linux folder structure. Ability to view with commands.
The commands for locating library files are as follows:
ll/usr/lib/i386-linux-gnu/| grep *curses* //No results, description library file is not in this folder
ll/lib/i386-linux-gnu/|grep *curses*
Binary file libncurses.so.5.9 matches //has the result that the library file is in this folder
2. The library file is available. However, you also need the header file associated with the library file: Curses.h. The commands for locating header files are as follows:
ll/usr/include/i386-linux-gnu/|grep *curses* //No results, description header file is not in this folder
3. No header files, only can install themselves .
Header file in the package, the package will be able to find the header file, but we do not know the package name, so. Make
Search by command:
Apt-cache Search Curses
The results of the search are as follows:
Bittornado-bittorrent Client (and Tracker) with console and curses interfaces
Iptraf-interactive Colorful IP LAN Monitor
Libcunit1-ncurses-unit testing Library for C (ncurses)
Libcunit1-ncurses-dev-unit testing Library for C (ncurses)--Development files
libncurses5-dbg-debugging/profiling Libraries for ncurses
Libncurses5-dev-developer ' s libraries for ncurses
libncursesw5-shared Libraries for terminal handling (wide character support)
libncursesw5-dbg-debugging/profiling Libraries for NCURSESW
Libncursesw5-dev-developer ' s libraries for NCURSESW
Libtinfo-dev-developer ' s library for the low-level Terminfo library
...//There is also a very good result, here are listed
We saw Libncurses5-dev-developer's libraries for ncurses This package and found it
Is the package we want, so we can install it.
4. Install the Libncurses5-dev package into the mint, with detailed commands such as the following:
Apt-get Install Libncurses5-dev //requires root privilege to run the command
Reading Package List ... Complete
Analyzing Dependency tree for Package
Reading status information ... Complete
The following additional packages will be installed:
Libtinfo-dev
Recommended Packages to install:
Ncurses-doc
The following "new" packages will be installed:
Libncurses5-dev Libtinfo-dev
0 packages have been upgraded and 2 new packages have been installed. To uninstall 0 packages, 492 packages have not been upgraded.
You need to download the 237 KB package.
1,176 KB of extra space is consumed after decompression.
Do you want to continue running? [y/n] Y //Confirm the need to install the package. Enter Y to indicate the installation
Get: 1 http://archive.ubuntu.com/ubuntu/trusty/main libtinfo-dev i386 5.9+20140118-1ubuntu1 [71.2 KB]
Get: 2 http://archive.ubuntu.com/ubuntu/trusty/main Libncurses5-dev i386 5.9+20140118-1UBUNTU1 [166 KB]
Download 237 KB, time 2 seconds (92.3 kb/s)
Selecting previously unselected package libtinfo-dev:i386.
(Reading Database ... There are currently 158,123 files and folders installed in the system. )
Preparing to unpack .../libtinfo-dev_5.9+20140118-1ubuntu1_i386.deb ...
Unpacking libtinfo-dev:i386 (5.9+20140118-1UBUNTU1) ...
Selecting previously unselected package libncurses5-dev:i386.
Preparing to unpack .../libncurses5-dev_5.9+20140118-1ubuntu1_i386.deb ...
Unpacking libncurses5-dev:i386 (5.9+20140118-1UBUNTU1) ...
Setting libtinfo-dev:i386 (5.9+20140118-1UBUNTU1) ...
Setting libncurses5-dev:i386 (5.9+20140118-1UBUNTU1) ...
5. Verify the header file we're looking for: Curses.h has been included in the Mint, detailed commands such as the following:
ll/usr/include/|grep curses.h
-rw-r--r--1 root root 77809 March curses.h
lrwxrwxrwx 1 root root 8 March ncurses.h-curses.h
From the results of the command, you can see the header file: Curses.h has been included in the system, indicating that the installation succeeded package: Libncurses5-dev.
We are able to develop relevant software for this package.
If you are unfamiliar with the Linux folder structure and are not familiar with the relevant Linux commands, you can use the graphical tools: new Rieter Package Management
Install the device .
Detailed steps such as the following:
1. Open the new Rieter Package Manager and click Search button. In the Search field, type: curses.
2. Find the package associated with the curses in the search results.
3. Find libncurses5 and Libncurses5-dev from the search results. The two are more like the package. Which package is it that we want to
of it? Can be distinguished by the description of the package, select the package name, click the attribute button. To view the properties of a package, the description of the package is described in
In the sex. the descriptive narrative of the LIBNCURSES5 package is for example the following:
This package contains the shared libraries that are necessary to execute programs that use ncurses compilation .
The descriptive narrative of the Libncurses5-dev package is for example the following:
This package contains the header files, static libraries
and symbolic links that developers using ncurses would need.
as you can see from the descriptive narrative, Libncurses5-dev is the package we want .
4. Click the right button to mark the installation. will be able to install the.
Crossing, they are. We found that the command to install the ncurses and install the Gcc,vim was the same after the comparison, just to verify that the installation was successful or not.
Not the same.
Of course, let's say we forget how to install GCC. You can click here to view the previous article; If you forget how Ann
To install VIM, you can click here to view the previous article. Also, we're just saying here how to install the curses package to build the development
Environment. The use of the package, as well as the use of other tools are not introduced. If you are interested, you can click here to see how to use
GCC, click here to see how to use Vim.
You crossing, this is the end of today's content. I want to know the funeral and listen to tell.
Linux Programming (Build development environment--curses)