How To Install Dev C++ In Debian

H

ow do I install GNU/GCC compiler and related tools (such as make, debugger, man pages) collection under Debian Linux system using command line options?
You need to install the following packages on a Debian and Ubuntu Linux:

Sep 30, 2015 Simply put, a compiler is a software program that processes instructions written in a programming language and creates a binary file that the machine’s CPU can understand and execute. In Debian-based distributions, the most well-known C and C compilers are gcc and g, respectively. May 29, 2018  Debian Linux install GNU GCC compiler - Explains how to install GNU GCC compiler and other tools such as GNU make, g and headers files to compiler software or write code using C / C. Uninstall libyaml-cpp-dev. To remove just libyaml-cpp-dev package itself from Debian Unstable (Sid) execute on terminal: sudo apt-get remove libyaml-cpp-dev Uninstall libyaml-cpp-dev and it’s dependent packages. To remove the libyaml-cpp-dev package and any other dependant package which are no longer needed from Debian Sid.

build-essential package – Installs the following collection to compile c/c++ program on Debian/Ubuntu Linux:
Advertisements
  1. libc6-dev – C standard library.
  2. gcc – C compiler.
  3. g++ – C++ compiler.
  4. make – GNU make utility to maintain groups of programs.
  5. dpkg-dev – Debian package development tools.


Basically, build-essential package contains an informational list of packages which are considered essential for building Debian packages including gcc compiler, make and other required tools. This package also depends on the packages on that list, to make it easy to have the build-essential packages installed.

Installation

Open the Terminal and then type the following apt-get command as root user or use the apt command:
$ sudo apt-get update
$ sudo apt-get install build-essential

OR
$ sudo apt update
$ sudo apt install build-essential

Sample outputs:

Verify installation

You can verify gcc compiler and make tool using the following syntax:
$ whereis gcc make
$ gcc -v
$ make -v

Sample outputs:

Now, you should able to compile software, create Debian packages or simply write a code using C / C++ compilers.

How do I install dev man pages?

Type the following command:
$ sudo apt-get install manpages-dev
Sample outputs:

Verify installation by reading some man pages:
$ man ls
$ man printf

See also
  • Man pages: apt(8)
This entry is 2 of 13 in the Linux GNU/GCC Compilers Tutorial series. Keep reading the rest of the series:
  1. Debian Linux Install GNU GCC Compiler and Development Environment

ADVERTISEMENTS

I need to compile an application with ncurses library and header files. How do I install install ncurses libs and header files on a Linux operating system? How do I write a simple hello world program using the ncurses and compile it on a Linux?
GNU ncurses is software API for controlling writing to the console screen under Unix, Linux and other operating systems. You can create text-based user interfaces (TUI) on a Linux or Unix-like system using ncurses library. [donotprint][/donotprint]
Advertisements

Installing the ncurses library in Debian/Ubuntu Linux

Dev C++ Download Windows 10

  1. You need to install the following two packages:
    libncurses5-dev : Developer’s libraries for ncurses
    libncursesw5-dev : Developer’s libraries for ncursesw
  2. Open the Terminal application.
  3. Type the following apt-get command to install ncurses header and libs:
    sudo apt-get install libncurses5-dev libncursesw5-dev

Sample outputs:

Installing the ncurses library in CentOS/RHEL/Scientific Linux 6.x/7.x+ and Fedora Linux 21 or older

Dev
  1. You need to install the following package:
    ncurses-devel : Developer's libraries for ncurses
  2. Open the Terminal application.
  3. Type the following yum command to install ncurses header and libs:
    sudo yum install ncurses-devel
How To Install Dev C++ In Debian

Sample outputs:

Installing the ncurses library in Fedora Linux 22.x+

  1. You need to install the following package:
    ncurses-devel : Developer's libraries for ncurses
  2. Open the Terminal application.
  3. Type the following dnf command to install ncurses header and libs:
    sudo dnf install ncurses-devel

How do compile C program and use the ncurses library?

Create a test program called hello.c as follows:

First, make sure you install GNU/GCC C compiler on a Linux:

To link to the ncurses library pass the -lncurses option to gcc/cc command:
$ cc -o output input.c -lncurses
$ cc -o hello hello.c -lncurses

Run it:
$ ./hello
Sample outputs:

Here is another program:

Compile and run it as follows:
$ cc -o curwin1 curwin1.c -lncurses
$ ./curwin1

Sample outputs:

See this page and GNU ncurses project home page for more information.

This entry is 10 of 13

Debian Linux Install

in the

How To Install Debian Usb

Linux GNU/GCC Compilers Tutorial

How To Install Dev C In Debian Version

C++

Dev C++ 5.11

series. Keep reading the rest of the series:
  1. How To Install ncurses Library on a Linux

How To Install Dev C In Debian Server

ADVERTISEMENTS