![]() |
Q&A Discuss: Quick C Programming Q
Thread created automatically to discuss a question in the Q&A Forum.
Quick C Programming Q Quote:
|
Or you could not spend copious amounts of money on a compiler and get LCC, DevC++ by Bloodshed Software, and numerous others that are out there.
Borland's Compiler is free, but their IDE is not... Just because it's Borland or Microsoft doesn't mean it's the best, but I must say that they are very nice (and expensive) IDE's... |
Compilers
If you've had any experience on the terminal (command line), just use the GNU GCC (3.0?) compiler. If you have a UNIX system, it comes with this. The same for Macintosh (OS X). Otherwise, do a search and download it.
GCC is free, and I would say it's the most widely-used compiler out there right now. Most UNIX professionals use GCC as part of any IDEs they use, as well as anyone programming on Mac OS X (Project Builder/XCode uses GCC as its compiler). Note however, that it is not an 'integrated development environment'. It is only a compiler, so you have to learn how to write code in individual files, bring in libraries, and then compile it using either a 'make' file (unix convention), or typing everything in on the command line yourself. You could also go out and find an integrated development environment. Most of these cost real money. I must say that the Microsoft IDEs are not organized in an intuitive way. I haven't seen any of the others at this point. Note: You cannot use a third party IDE (or even GCC) to program for the Microchip PIC18. Those IDEs and compilers are configured to compile code for your computer, not the microchip. They will help you to learn C and figure out how things work, but you will have to use the MPLAB IDE and C18 to write code for the microchip PIC. I would recommend this book: The C Programming Language, 2nd Edition, by Brian W. Kernighan and Dennis M. Ritchie. It defines the ANSI Standard, all its conventions, and the standard UNIX libraries. You can get a copy via Amazon.com here: http://www.amazon.com/exec/obidos/tg...lance&n=507846 |
I love GCC with a passion, but newbies might find it difficult to get the concept of compiling then linking the files...
When GCC compiles, if you have more than one file, it doesn't make them into an executable. You typically end up with a .o file which you have to use a linker to link into an executable... I'd suggest if you're on Win32 just stick to DevC++ (which has an IDE + linker) or LCC (IDE + linker). If you want to use the console, stick to DGJPP (the DOS port of GCC which has an IDE + linker built right in :)). |
This is slightly off-topic, but does anyone know if the compiler for the Robot Controller can be run on the command line without the IDE? I'd rather use my Eclipse IDE, configured to use that (if I can make it use minGW and SDL I think it'll use anything, man that was a pain! :D)
And Dev-C++ is good and comes with minGW, which is a windows ports of gcc IIRC. |
My assumption is that it saves the files you work with as plain text .c and .h files, and therefore can be opened, manipulated, and other such wonderful things before being reopened in the IDE and compiled. I doubt that they have a command line utility.
|
Quote:
Mike |
| All times are GMT -5. The time now is 15:22. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi