Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 30-01-2006, 05:24 PM   #1 (permalink)
Broken In
 
Join Date: Oct 2004
Posts: 162
Default running c++ program in linux

i am very new to linux

using ubuntu os

i know only turbo c++ programs i want to run turbo c++
program in linux gnu

how do i know whether i have gnu software in my linux
shivi4 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 30-01-2006, 07:27 PM   #2 (permalink)
Alpha Geek
 
Satissh S's Avatar
 
Join Date: Mar 2005
Location: Chennai , India
Posts: 693
Default

We have gnu compiler collection in GNU\Linux. Gcc is one of the most robust c compilers in the world. You can use it in place of turboc or if you need an IDE, use Anjuta. Use synaptic to install anjuta and start using it.
__________________
Call it Emacs,
Love it or Leave it.
Satissh S is offline  
Old 30-01-2006, 07:28 PM   #3 (permalink)
Wise Old Owl
 
vignesh's Avatar
 
Join Date: Jul 2004
Location: Chennai
Posts: 1,659
Default

Gcc is the compiler present in Linux...Install it using synaptic ...

Just select build-essential packages it will install gcc also...
vignesh is offline  
Old 30-01-2006, 08:56 PM   #4 (permalink)
Broken In
 
Join Date: Oct 2004
Posts: 162
Default

how to detect gcc in linux

and how to install
i dont know how to install in linux
shivi4 is offline  
Old 30-01-2006, 09:28 PM   #5 (permalink)
Wise Old Owl
 
vignesh's Avatar
 
Join Date: Jul 2004
Location: Chennai
Posts: 1,659
Default

Open synaptic and install it by selecting on gcc....Search for it in synaptic if you can`t find it.
vignesh is offline  
Old 30-01-2006, 10:12 PM   #6 (permalink)
In The Zone
 
Join Date: May 2004
Location: ** Hosur ** Operating System:GNU
Posts: 451
Default

Quote:
Originally Posted by shivi4
how to detect gcc in linux

and how to install
i dont know how to install in linux
Open terminal and type "gcc" and press enter to see if it is installed, if it says command not found then it might not be installed.

gcc <filename>
eg: gcc shiv.c
__________________
Million's Of Open Minds Can't Be Wrong!
http://nc.xmgfree.com/weblog
Everybody Wants to go to Heaven...But nobody wants to Die!
naveenchandran is offline  
Old 30-01-2006, 10:23 PM   #7 (permalink)
Alpha Geek
 
Satissh S's Avatar
 
Join Date: Mar 2005
Location: Chennai , India
Posts: 693
Default

also give
$gcc --version
to get the version, since it's ubuntu 5.10 it might be 3.4 :roll: Just a guess.
__________________
Call it Emacs,
Love it or Leave it.
Satissh S is offline  
Old 31-01-2006, 06:19 PM   #8 (permalink)
Broken In
 
Join Date: Oct 2004
Posts: 162
Default

what is synaptic how to install that
shivi4 is offline  
Old 31-01-2006, 06:21 PM   #9 (permalink)
Broken In
 
Join Date: Oct 2004
Posts: 162
Default

i am getting this
which guess i have gcc
but how to run c+ file
in the terminal

gcc (GCC) 3.3.4 (Debian 1:3.3.4-9ubuntu5)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
shivi4 is offline  
Old 31-01-2006, 06:21 PM   #10 (permalink)
Wise Old Owl
 
desertwind's Avatar
 
Join Date: Nov 2004
Location: Hyderabad
Posts: 1,096
Default

btw, he asked for a c++ compiler. gcc is gnu c compiler. try th following for a cpp file

g++ <filename.cpp>

after successful compilation

./a.out

for running the program
__________________
Sometime you'll think you understand everything

...Then you'll regain consciousness
desertwind is offline  
Old 31-01-2006, 06:22 PM   #11 (permalink)
Broken In
 
Join Date: Oct 2004
Posts: 162
Default

i am writing this program as demo
#include<conio.h>
#include<iostream.h>
#include<stdio.h>
using namespace std;
int main()
{
cout<<"hello";
return 0;
}
shivi4 is offline  
Old 31-01-2006, 06:25 PM   #12 (permalink)
Broken In
 
Join Date: Oct 2004
Posts: 162
Default

ok how to use other header files in gcc
shivi4 is offline  
Old 31-01-2006, 07:01 PM   #13 (permalink)
Wise Old Owl
 
vignesh's Avatar
 
Join Date: Jul 2004
Location: Chennai
Posts: 1,659
Default

conio.h is not present in gcc... What other header files do you want to use...
vignesh is offline  
Old 01-02-2006, 02:00 AM   #14 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,513
Default

Borland' C/C++ compiler's a little different eg graphics.h etc is not a defacto thus not present in g++.Now many books for eg Cpp for Dummies etc cites examples been compiled on using gcc either in Windows OS or Linux.In windows some minimalist gnu...mingw32 etc should be installed.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 09:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2