Question:
how to work c,c++ in ubuntu 9.04?
prabhu_dee
2010-11-24 01:53:02 UTC
how to work c,c++ in ubuntu 9.04 ???????????
i installed GCC compiler
tell me the working steps to write program,save,compile and run the program..
Five answers:
jplatt39
2010-11-24 02:33:47 UTC
Back when I used GNOME I used to write my programs with gedit. I would save it and give it the c or cc (I learned C++ in UNIX) I would open a terminal and type type gcc -o myprog myprog.c or g++ -o myprog myprog.cpp. There is another switch to use for gcc if you want to debug: -g you compile it with g** -g -o myprog myprog.* -- replace the wild cards yourself -- then type gdb myprog and when you get to the prompt type list.



UNIX and Linux, unlike Windows, do not include the current path in the $PATH variable. to run a program either click on it or from the command line type ./myprog for our example. That's dot slash, reversing which is how the slashdot website got its name.



You CAN install ides like Eclipse or Code::Blocks, or you can learn emacs which you can call the original GNU ide (I prefer vi myself but I learned it before I learned linux) however they aren't necessary and the project files take up too much space. Makefiles, also mentioned in my link make large projects a breeze.
?
2010-11-24 01:58:23 UTC
How to Install C and C++ Compilers in Ubuntu and testing your first C and C++ Program http://www.ubuntugeek.com/how-to-install…
Gopinath M
2010-11-24 07:04:42 UTC
press alt+f2 (for run window)



type gedit ( like notepad)



type in the code and save it as hello.c



#include

void main() {printf("\n Helo world");}



now go to terminal..

again alt+f2 and type gnome-terminal



this will bring in the terminal. (u can also access it from the top toolbar)



now go to the program location ( the place where u store .c file)

remember linux is case sensitive.... desktop is different from Desktop



cd Desktop



then use gcc to compile the program..



gcc hello.c

./a.out



./a.out to run the file...



check gcc --help for more help....
Linux Mint 11
2010-11-25 01:00:54 UTC
How to Install C and C++ Compilers in Ubuntu and testing your first C and C++ Program

http://www.ubuntugeek.com/how-to-install-c-and-c-compilers-in-ubuntu-and-testing-your-first-c-and-c-program.html



Here is an example of a script I have recently used to install Experimental Plugins on Compiz 0.8.6

http://www.webupd8.org/2010/11/install-compiz-experimental-plugins-in.html



sudo apt-get install compiz-fusion-bcop compizconfig-settings-manager compiz-dev build-essential libtool libglu1-mesa-dev libxss-dev libcairo2-dev git-core



cd && git clone git://anongit.compiz.org/users/soreau/scripts compizexperimental



cd compizexperimental/



chmod +x compiz-addons



cd ~/compizexperimental/



./compiz-addons install all





LUg.
willock
2016-10-03 02:22:59 UTC
till now They have been prominent: The Outsiders First traces: Jason Patric Get Your recreation On: super Joe teach Me the money: Civil war video games n eCards minutiae: Mamba u . s . a . music minutiae: U.S. Virgin Islands music Pop Quiz: greater Hip-Hop-Like classic Rock project: Newport individuals pageant celeb Interview Video minutiae: Vanessa Williams entertainment Video minutiae: 20 on a regular basis Dose Video minutiae!: Swedish entertainment Zone!: increasing in this section video clips long gone Wild!: White interior Oprah's Maui Farm 19: i like my Farm Jason Derulo shares Inspiring tale 19: His Head superb Pre and positioned up-exercising habitual ingredients 19: danger life Of the wealthy & prominent!: faith stinky warm Spots on the physique 19: The Scalp What motives undesirable Breath? 19: Mickey


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...