Compile C & C++ program in ubuntu 14.04 using codeblocks


Most of the people don’t have clear idea how to run C program in Linux. Today i will discuss how to run c program in linux. My development mechine is latest ubuntu 14.04. we have to install codeblocks.

Open the terminal. write
$ sudo apt-get update
$ sudo apt-get install build-essential
$ sudo apt-get install codeblocks
From the dashboard open Codeblocks. Then creat a new project – go- next- console application- go- c – next – project title – Project directory – Next – Finish.




 Here you must select the project folder in home directory. If you put it in another directory it will not work.



Double click on the left side Source-main.c . Now write your code on the right side.







Now save and compile. You can save it using CTRL+S and you can compile with F9 button. You may know no need to use clrscr() function in codeblocks.





By this process, You can run C and C++ program in Linux.








Comments

Popular Posts

Install and configure Network simulator (ns3) on Ubuntu 14.04