Build a complete C ++ programming environment in Ubuntu
Source: Internet
Author: User
I. The C/C ++ compiler and the basic library and common tools (gcc series) have already installed GCC in the Ubuntu system, but this GCC file cannot be compiled, because there are no required header files, so to install the build-essential Package, installed with this package will automatically install on g ++, libc6-dev, linux-libc-dev, libstdc ++ 6-4.1-dev and other required software and header file libraries. 1. Install the required software package: sudoapt-
I. C/C ++ compilers and basic libraries and common tools (gcc Series) The newly installed Ubuntu system already has GCC, but no GCC file can be compiled. Because there are no necessary header files, you need to install the build-essential software package, installed with this package will automatically install g ++, libc6-dev, linux-libc-dev, libstdc ++ 6-4.1-dev and other necessary software and header file library.
1. Install the required software package:
Sudo apt-get install build-essential
2. Editor:
Sudo apt-get install emacs
Sudo apt-get install vim
The default syntax coloring function of vim is disabled. You can edit the/etc/vim/vimrc file.
Remove the symbols before syntax on and save them. You can start the syntax coloring function of vim.
2. GTK/GNOME Development Environment (libraries, IDE, and tools) Required software packages:
Sudo apt-get install gnome-dev
3. Qt/KDE Development Environment (libraries, tools, and IDE) Libraries and tools (software packages ):
Sudo apt-get install kdesdk
IDE (Software Package ):
Sudo apt-get install kdevelop
4. About Anjuta installed on the local machine Anjuta is just an IDE environment for writing C and C ++. Www.linuxidc.com can be used to write programs, including programs running on terminals (similar to DOS Programs) and graphic interfaces (similar to window programs ).
IDE environment: Install Anjuta
Sudo apt-get install anjuta
Next we will use Anjuta to write a C and a C ++ Application | programming | Anjuta IDE
Create a project and use the Wizard to generate a C program framework. You can generate many files in the same way as Visual C ++, Which is troublesome to use IDE.
Select Generic under the C Tab
Use the default foobar-sample for the project name
Select All under optional: None
The generated destination is: Master Folder: yunky to create a new folder: test
In the file directory on the left of Anjuta, open the src folder, and you can see that there is a main. c. Open it. You can see that the wizard has generated a c program for us:
# Include
Int main ()
{
Printf ("Hello world \ n ");
Return (0 );
}
Generate a project by shift + F11 (corresponding to: Generate | generate a project)
Press F3 (corresponding to: run | execute the program (select the program to run) to run on the terminal.
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