Free Compiler/Linker for WinXP?

I’m trying to learn C well enough to head our team’s programming group. I’d like to find a compiler and linker that I can run under XP Home, the OS of my family’s PC. I’d also like it to be free - being an unemployed high schooler doesn’t give me very much free money. :slight_smile:

Any suggestions?

*Originally posted by IMDWalrus *
**Any suggestions? **

Well, as long as you don’t need an IDE, I’d recommend installing Cygwin. It’ll provide you with a Unix-like environment, but more importantly it will provide you with the GCC compiler suite. Just make sure you select everything under the “Development” secction when installing Cygwin.

Or: http://www.bloodshed.net/

I believe it’s also a port of gcc… but without the entire Cygwin environment and it throws in an IDE I believe… I dunno myself as I’ve never used it.

I’ve used it before for C++ work, it’s pretty nice, if a little picky, however I never tried it with C. Also, all you should need to learn is the syntax structure. Anything beyond that would be wasted as the RCs use a different architecture altogether.

In school, we use eclipse for programming (www.eclipse.org). It works greats. (we use it for Java, but the site says it works for all (i think))

*Originally posted by djcapelis *
**Or: http://www.bloodshed.net/

I believe it’s also a port of gcc… but without the entire Cygwin environment and it throws in an IDE I believe… I dunno myself as I’ve never used it. **

The IDE is called Dev-C++, and it has gcc, and MingW (a gcc port to the Windows platform). I’ve used it before, and find it decent for a free tool. I can’t say it’s perfect because even the last stable version (4.0.1) wasn’t all that good, but the v5 betas are getting there.

As for a compiler/linker, as far as I know, if one works on Win95, 98, or ME, it’ll work on 2k, NT, and XP.

I personally use the DJGPP compiler, because of the Allegro library, but I would recommend the cygwin port of gcc. Gcc is stable, can be used under most OSes, and is free. The initial setup of Cygwin is not difficult, and gcc has so many tutorials available.

Look up LCC. It’s quite nice.

As is Dev C++…but I prefer LCC for C programming.

What’s so special about the Allegro library, couldn’t you use it with any of the compilers listed above?

Of course, I don’t know what the library does, but there’s not much reason the Allegro library should be tied to the compiler…?

*Originally posted by Matt Krass *
**…Also, all you should need to learn is the syntax structure. Anything beyond that would be wasted as the RCs use a different architecture altogether. **

I think we’ve all forgotten about this point (including me). Dev-C++ won’t help us when we need to program the robot, LCC won’t help us if we need to fix a programming error in 5 mins. flat.

The only compiler AFAIK that I know of that will help is the one that Microchip has. Others will just through out an error, due to the fact that the keywords are different (in C18, you don’t have void main(…){ … }, you have [some new type] main(…){…})

If you look at the docs, I think that a starting program is given.

*Originally posted by Raven_Writer *
**I think we’ve all forgotten about this point (including me). Dev-C++ won’t help us when we need to program the robot, LCC won’t help us if we need to fix a programming error in 5 mins. flat.

The only compiler AFAIK that I know of that will help is the one that Microchip has. Others will just through out an error, due to the fact that the keywords are different (in C18, you don’t have void main(…){ … }, you have [some new type] main(…){…})

If you look at the docs, I think that a starting program is given. **

I think the starter of this thread was wanting to learn general C first, then learn PIC-C. These suggestions would work fine for that…

The keywords aren’t different…they’re the same. It’s the majority of the same language as C, but you just don’t have a lot of the libs. There’s a different between keywords and library functions.

Oh and on a side note: The main function on an 18F8520 isn’t ‘main’…it’s ‘entry’. :wink:

*Originally posted by Jeremy_Mc *
**I think the starter of this thread was wanting to learn general C first, then learn PIC-C. These suggestions would work fine for that…

The keywords aren’t different…they’re the same. It’s the majority of the same language as C, but you just don’t have a lot of the libs. There’s a different between keywords and library functions.

Oh and on a side note: The main function on an 18F8520 isn’t ‘main’…it’s ‘entry’. :wink: **

Well, we can’t really tell, but yea, your probably right :wink:

I could’ve sworn I read somewhere about the C18 language that the keywords are different…all well. I know there’s a difference between keywords & library functions. Not to mention the fact that functions and keywords aren’t even the same.

*Originally posted by Jeremy_Mc *
I think the starter of this thread was wanting to learn general C first, then learn PIC-C. These suggestions would work fine for that…

That was, in fact, my goal. :slight_smile:

Thanks for the suggestions. Right now, I’m planning on downloading the compilers suggested and seeing what one works best for me.

Second question: does anyone have a copy of the sample program for the EDU this year? Unless things have changed, 818 isn’t going to be getting one this year. I’d still like to see the program, though.

Again, thanks for all of the suggestions. Now, I’ve got two months to learn C…

*Originally posted by IMDWalrus *
**does anyone have a copy of the sample program for the EDU this year? Unless things have changed, 818 isn’t going to be getting one this year. I’d still like to see the program, though.
**

www.innovationfirst.com – They have the default code on there listed under ‘Documents’.

Also, there was a White Paper posted today with a modified version of the default code. If you want to see how some teams did it, then you can look in that…

*Originally posted by Jeremy_Mc *
**Oh and on a side note: The main function on an 18F8520 isn’t ‘main’…it’s ‘entry’. :wink: **

Depends on your definition of “main function”. The user entry point (what most people would describe as the main function) is still main(). _entry() is just the reset vector. For a programmer sitting down to write code for the new robot, they will still start with main().