LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-26-2005, 09:06 AM   #1
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459

Rep: Reputation: 30
basic compiler


Ive been coding C C++ for only a few weeks and mostly in MS. I looking for some advice on a good compiler for a newbie.
 
Old 09-26-2005, 09:12 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Well, probably the best compiler out there is good old GCC. It is straight forward to use for Newbies or advanced users. At some point you probably want to check out Make which allows you to right scripts to build your code so you don't have to type longish compile command lines each time.

Code:
#include<stdio.h>

int main()
{
    printf("Hello World\n");
    return 0;
}
Code:
j_shaw@jshaw ~ $ gcc -Wall -o test test.c
j_shaw@jshaw ~ $ ./test
Hello World

Last edited by jtshaw; 09-26-2005 at 09:14 AM.
 
Old 09-26-2005, 09:30 AM   #3
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459

Original Poster
Rep: Reputation: 30
ok cool

and do you just use vi for an editor?
 
Old 09-26-2005, 09:36 AM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Personally? I use vim. Realistically you can use whatever you want so long as it doesn't put stupid smart quotes or any other psuedo characters in the file.
 
Old 09-26-2005, 09:57 AM   #5
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459

Original Poster
Rep: Reputation: 30
1 last thing

First of all thanks for the help.

This is a bit different than Im used to so if I wanted some type of editor which could help show me mistakes or errors while editing (if possilbe) what would you recommend?

Actually I do see where it tells me the line the error is in, so I guess its not that bad.. .just might take some getting used to.
Code:
complete.c: In function 'valid':
complete.c:62: warning: suggest explicit braces to avoid ambiguous 'else'
complete.c:58: warning: unused variable 'negCount'
 
Old 09-26-2005, 10:00 AM   #6
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Also keep in mind you can run some commands (like make) from within VIM and it'll automatically take you to the first error reported. (emacs will do this as well)

As far as something that will automatically tell you what errors you have, some of the IDE's might do that but I'll let someone else comment on that as I don't use any of them.

Last edited by jtshaw; 09-26-2005 at 10:01 AM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 12:35 PM
is there a BASIC interpreter/compiler? needforspeed Programming 4 05-01-2005 02:47 PM
quick basic compiler for linux bsengland Linux - General 1 05-17-2004 02:40 PM
Compiler conundrum: Which came first, a compiler, or it's source code? fr0zen Programming 21 01-29-2004 04:31 AM
I'm a BASIC chap, looking for some info on BASIC programming CragStar Programming 2 01-21-2001 09:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration