Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2306099
  • 博文数量: 266
  • 博客积分: 5485
  • 博客等级: 大校
  • 技术积分: 3695
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-20 11:05
个人简介

多读书,多做事,广交朋友,趣味丛生

文章分类

全部博文(266)

分类: LINUX

2010-09-08 20:09:02

When it comes to programming(C/C++ or other ),Ubuntu 10.04 or any distribution of Linux is far better than Windows NT based Operating system(windows XP or Vista or 7).In general people uses TurboC++ on windows but in Ubuntu 10.04 advanced and much efficient compiler are available for compiling C or C++ programs.Some people or students think that programing in Linux is very tough(Actually they feel scary due to the shell Commands) but I assure you that it is nothing but a misconception.But now,I think the misconceptions are decreasing and they are becoming familiar with Ubuntu/linux environment.

Text Editor in Ubuntu 10.04
Since Ubuntu 10.04 uses GNOME as their default desktop so there is no need to worry about text editor because Gedit text editor is installed by default.It has many advanced features like Syntax coloring so it is well suited for programming.Another KDE based version is also available Kwrite,similar to gedit with lot of features.

C Compiler for Ubuntu 10.04

For C program there is a modern compiler GCC(GNU Compiler Collection) which you can use to compile C programs.To install gcc type following command at command line.(It may be installed already)
sudo apt-get install gcc

Compiling C program in Ubuntu 10.04
user1004@user1004-desktop:~/Desktop$ gcc abc.c
user1004@user1004-desktop:~/Desktop$ ./a.out

*********Hello! Mr.X it’s working Enjoy!!******
user1004@user1004-desktop:~/Desktop$

C++ Compiler for Ubuntu
For C++ programs you can use G++ compiler an advanced compiler with lot of features.To install G++ type following command at command line.
sudo apt-get install g++

Compiling C++ program in Ubuntu 10.04
user1004@user1004-desktop:~/Desktop$ g++ decbin2.cpp
user1004@user1004-desktop:~/Desktop$ ./a.out

Enter the decimal number to be converted
23
The Equivalent binary number is     010111
user1004@user1004-desktop:~/Desktop$

IDE(Integrated Developement Environment) for programming in C and C++
For programming in c++ these are the most widely used IDE’s

  • Kdevelop
  • Eclipse
  • Frama C
  • Anjuta

More details on available IDE on Ubuntu-Linux

阅读(3182) | 评论(0) | 转发(0) |
0

上一篇:Ubuntu OpenCV的安装

下一篇:Ubuntu手动安装JDK

给主人留下些什么吧!~~