Thread: Tools

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    1

    Tools

    Hi! I`d like to know some good tools for a C programer beginner.
    Could somebody also send a web page or something that I can learn the basics?
    TKS!

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    All you need is a compiler. Also very important: a text editor with syntax highlighting. A text editor IS NOT a word processor!

    On linux, try gvim.
    On windows, notepad++ (or something).

    I lot of people will recommend an "Integrated Development Environment" (IDE) such as eclipse or Visual Studio. These are editors combined with a compiler and debugger. In my opinion, most of them are NOT aimed at beginners and will only cause you unnecessary grief.

    Also, by using the compiler in a console instead of via an IDE, you may learn a little bit about the fundamentals. This does not mean it is harder, it's actually easier -- the idea that an IDE will make much of anything easier for a beginner is false, and perhaps perpetuated on the (also false) premise that using the command line is difficult, whereas using a GUI is easy.

    For the compiler itself, use gcc. On linux it is almost always already installed. On windows I believe you want "Mingw":

    MinGW | Minimalist GNU for Windows
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #3
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    Agreed with almost everything MK27 said. Only thing I would change is the editor on Linux (not dissing VIM, just would not suggest it to a newbie since it works completely differently than any editor said newbie has ever used and may be perceived as user hostile) and add that the newbie should learn his or her debugger well....some of the most painful or pleasurable time the newbie spends working with code will be spent using this tool. As for the editor I would suggest a text-mode editor (to go along with the text-mode debugger and compiler) because this also makes it far easier to do remote development/debugging as well.

    Oh and I would throw in a suggestion for Valgrind for catching certain classes of errors....I think Bounds Checker would be the Windows equivalent.

    Peace
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  4. #4
    Learning C. JOZZY& Wakko's Avatar
    Join Date
    Nov 2009
    Posts
    59
    Quote Originally Posted by MK27 View Post
    All you need is a compiler. Also very important: a text editor with syntax highlighting. A text editor IS NOT a word processor!

    On linux, try gvim.
    On windows, notepad++ (or something).
    Wouldn't both fit in for Windows if you run DEV-C++ it also supports C?

    Btw. on Linux I am using Kwrite and GCC now to write and compile scripts. Are these very limited or are they good enough for the task? I am running an Ubuntu based version of Linux.
    Last edited by JOZZY& Wakko; 12-18-2009 at 10:30 AM.

  5. #5
    Registered User
    Join Date
    Dec 2009
    Posts
    18
    Well, first of all:

    Welcome.

    As for the compiler, if you're using windows than I'd probably recommend an IDE (C-Dev++) as it is simple to use and easy to get to know it.

    On linux either use a text editor like gvim (as stated before) or try Eclipse (IDE), that's what I use, because when you're learning you'll spend so much time compilling and trying to figure out errors, correcting them and compilling again. Using gcc directly from the command line might get a little bit boring.

    Using Eclipse (after beeing set up) all you have to do is click a button to save changes and compile your program.

    This is just my opinion, and you're probably better waiting for the big guys to come here give you some help. Because my main speciality is coming here crying for help. ;P

  6. #6
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    Quote Originally Posted by JOZZY& Wakko View Post
    Wouldn't both fit in for Windows if you run DEV-C++ it also supports C?

    Btw. on Linux I am using Kwrite and GCC now to write and compile scripts. Are these very limited or are they good enough for the task? I am running an Ubuntu based version of Linux.
    KWrite is a surprisingly good programmers editor for KDE and I *think* is the core editor for KDevelop. On GNOME GEdit is a close second though it doesn't have all of the bells and whistles that KWrite does. KWrite is actually closer to a pure-play text editor than word processor.

    BTW if you wanted an IDE for Linux, depending on "how much" IDE you want, Anjuta is good on GNOME, KDevelop is good on KDE. Codeblocks I hear is good and if you want something the kinda-sorta looks like V. Studio on Windows, CodeLite is quite nice.

    As covered in another thread the base debugger on Linux is GDB which is a command line debugger but there are a number of GUI front-ends available for it.

    A good merge/diff tool would be handy to have as would a decent version control system (VCS) to keep your code versions straight. Subversion is popular, supported on all platforms that I know of and has a number of GUI front-ends available.

    If you are just creating code for yourself then that's fine. If however you need to understand someone elses codebase, getting a good C/C++ cross-reference tools (ie ctags) would be a nice tool to have as well.
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  7. #7
    Registered User
    Join Date
    Oct 2006
    Posts
    250
    Quote Originally Posted by JOZZY& Wakko View Post
    Wouldn't both fit in for Windows if you run DEV-C++ it also supports C?

    Btw. on Linux I am using Kwrite and GCC now to write and compile scripts. Are these very limited or are they good enough for the task? I am running an Ubuntu based version of Linux.
    If you're used to kwrite, I would seriously recommend you switch to kate, since it has a built-in command line, which makes is very convenient when fixing compiling errors and debugging. And of course, because it is the setup I'm using as well

  8. #8
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    Quote Originally Posted by MWAAAHAAA View Post
    If you're used to kwrite, I would seriously recommend you switch to kate, since it has a built-in command line, which makes is very convenient when fixing compiling errors and debugging. And of course, because it is the setup I'm using as well
    Dog gone it. I had a brain-f@rt. Kate is what I meant, not KWrite...I use Emacs pretty exclusively and was reporting from an apparently dodgy memory. Kate is the better editor between the two....(Kate vs KWrite)..sorry for the misleading recommendation....

    D'oh! ^__^
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by MK27 View Post
    I lot of people will recommend an "Integrated Development Environment" (IDE) such as eclipse or Visual Studio. These are editors combined with a compiler and debugger. In my opinion, most of them are NOT aimed at beginners and will only cause you unnecessary grief.

    Also, by using the compiler in a console instead of via an IDE, you may learn a little bit about the fundamentals. This does not mean it is harder, it's actually easier -- the idea that an IDE will make much of anything easier for a beginner is false, and perhaps perpetuated on the (also false) premise that using the command line is difficult, whereas using a GUI is easy.
    Yeah? And what if I fail miserably and find it annoying or hard to do it manually and find using IDEs much better?
    Honestly, this is subjective. I would suggest that the OP tries doing it both ways and sticking with what feels most natural.
    You are bound to read a tutorial or two anyway. And an IDE will probably help you get started a little faster, but as previously mentioned, take a pick, see what works for you.
    Another option for Windows is Visual Studio (IDE).
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Elysia View Post
    I would suggest that the OP tries doing it both ways and sticking with what feels most natural.
    Well of course, and I presumed someone else would be along with other suggestions.

    One thing I noticed here was "Using gcc directly from the command line might get a little bit boring" vs. a single click in an IDE; on linux the command line has a history, so repeating a command is only one keystroke -- presuming beginner programs usually run in a console, that could not be easier, and you actually know exactly what command is being issued (whereas an IDE add a layer of opacity, and issues a "command-line" in the background for you), AND you can go back and choose from a few different commands if they are sequential in the history.

    But if your OS does not provide a command history, or you are not aware of using the "up" and "down" arrows on the command-line, then doing all that unnecessary typing would be a pain

    ps. "gvim" was a silly suggestion, as jeffcobb points out. Kate sounds good, even "gedit" will be fine to start with since it does highlight syntax.
    Last edited by MK27; 12-19-2009 at 09:06 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I don't actually know the the meaning of "boring" in this case, but I presume it isn't related to history.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Elysia View Post
    I don't actually know the the meaning of "boring" in this case, but I presume it isn't related to history.
    No, it surely means the fonts and the sparkly menubar

    Actually I just started to use "g"vim and have to admit the GUI is more convenient than the console -- just it is much uglier. Nothing more aesthetic to my eyes than a fullscreen transparent terminal with a big muted christmas tree for the background.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. tools for static code analysis
    By lehe in forum C++ Programming
    Replies: 2
    Last Post: 03-18-2009, 12:41 PM
  2. A few interesting tools...
    By Mad_guy in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 03-10-2009, 06:07 PM
  3. GNU Auto build tools
    By jmd15 in forum Linux Programming
    Replies: 2
    Last Post: 07-03-2008, 09:19 AM
  4. Debugging tools for windows
    By 0x90 in forum C++ Programming
    Replies: 4
    Last Post: 04-03-2006, 02:21 PM
  5. Code coverage tools
    By bswole in forum Linux Programming
    Replies: 2
    Last Post: 03-20-2002, 08:16 AM