Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 05-31-2005, 09:05 PM   #1
Baseband Member
 
Join Date: May 2005
Posts: 63
Default How-to wirte C/C++ on Linux computer ?

hi everyone

i have been using Visual basic on Window, but not sure what to do on linux.

I just installed Linux Centos on my machine yesterday. Ready to start now . Thank for reading
__________________

v_xxx_v is offline   Reply With Quote
Old 06-01-2005, 04:16 AM   #2
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: How-to wirte C/C++ on Linux computer ?

There is no equivelant to visual basic on linux...

use a regular text editor to write the source code and then you can compile using gcc. a free compiler that is available for all versions of any OS...
__________________

root is offline   Reply With Quote
Old 06-01-2005, 03:00 PM   #3
Baseband Member
 
Join Date: May 2005
Posts: 63
Default Re: How-to wirte C/C++ on Linux computer ?

Quote:
Originally Posted by root
There is no equivelant to visual basic on linux...

use a regular text editor to write the source code and then you can compile using gcc. a free compiler that is available for all versions of any OS...
thanks

Where do i download gcc ?
v_xxx_v is offline   Reply With Quote
Old 06-01-2005, 05:17 PM   #4
Fully Optimized
 
UK31337's Avatar
 
Join Date: Feb 2005
Posts: 2,776
Default

Chances are you'll already have gcc.

Open Terminal, and type gcc and press enter. If you have it, it'll say something like: "gcc - no input files". Try this with g++ and c++, and you should get the same result, except it'll say g++/c++ - no input files instead of gcc.

Try it.
__________________
Master of common sense. If you don't like it, stop reading.
UK31337 is offline   Reply With Quote
Old 06-01-2005, 06:54 PM   #5
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: How-to wirte C/C++ on Linux computer ?

if you'd have typed gcc into google and pressed "i'm feeling lucky" yuo'd have neded up here...

http://gcc.gnu.org/

if you don't have it... download it.
root is offline   Reply With Quote
Old 06-05-2005, 10:40 PM   #6
Solid State Member
 
Charlie_Za-cl's Avatar
 
Join Date: Oct 2004
Posts: 8
Send a message via MSN to Charlie_Za-cl
Default Re: How-to wirte C/C++ on Linux computer ?

g++ "main.cpp" -o "name"
./name
Charlie_Za-cl is offline   Reply With Quote
Old 06-11-2005, 08:30 AM   #7
Daemon Poster
 
RewtGuy's Avatar
 
Join Date: Dec 2004
Posts: 595
Send a message via AIM to RewtGuy
Default Re: How-to wirte C/C++ on Linux computer ?

first you have to write the source to a file and have the file extention .cpp, then just g++ filename.cpp
__________________

__________________
Windows: A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition.
RewtGuy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off



All times are GMT -5. The time now is 08:50 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0