Getting Started With C Using NetBeans
Written by Harry Fairhead   
Monday, 13 June 2016
Article Index
Getting Started With C Using NetBeans
Hello C World


Using Tool Collections

If you encounter a problem with the Tool Collection at this point it is probably better to cancel the project creation and move to the Services window to examine the Tool Collections available. 




You can see the Tool Collections that are locally installed and any that are installed on remote servers. Using a remote build server is a perfectly good way to learn C programming but a local Tool Collection is perhaps easier - see Remote C/C++ Development With NetBeans.

If you right click on a Tool Collection and select properties then the dialog box that appears tells you where each of the components of GCC and the make utility are located. If you know better then change the entries. More commonly if NetBeans has failed to automatically find any of the components it is up to you to supply their locations.  




In the case or MinGW, if anything is missing the simplest option is to go back to the installer and try again. As long as you are using the correct version of MinGW, NetBeans should just work.

Creating a Hello World Program

If all of this is okay it is now time for the easy part - creating the Hello World program. 

Go back to the projects tab, drop down the Source Files node in the Projects window and select main.c. This will open in the editor. Change the program to read:




In other words add

printf("hello C World");

to the program. Now click the green arrow compile and run button or use Run, Run Project or press F6 and your program will be compiled and run. You will see the output in the Output window a the bottom of the screen. You will also see a lot of other messages scroll past before your program is run - what some of these mean will be explained in later parts. 




If you have a working C compiler you are now ready and equipped to move on to the next stage and start learning some C. 

Watch this space for the next installment.


Fundamental C: Getting Closer To The Machine

Now available as a paperback and ebook from Amazon.

  1. About C
      Extract Dependent v Independent
                  & Undefined Behavio
  2. Getting Started With C Using NetBeans
  3. Control Structures and Data
  4. Variables
      Extract Variables
  5. Arithmetic  and Representation
      Extract Arithmetic and Representation
  6. Operators and Expression
      Extract: Expressions
      Extract Side Effects, Sequence Points And Lazy Evaluation
      First Draft of Chapter: Low Down Data
  7. Functions Scope and Lifetime
  8. Arrays
      Extract  Simple Arrays
      Extract  Ennumerations
  9. Strings
      Extract  Simple Strings
    Extract: String I/O ***NEW!!
  10. Pointers
      Extract  Starting Pointers
      Extract  Pointers, Cast & Type Punning
  11. Structs
      Extract Basic Structs
      Extract Typedef
  12. Bit Manipulation
      Extract Basic Bits
      Extract Shifts And Rotates 
  13. Files
     Extract Files
    Extract Random Access Files 
  14. Compiling C – Preprocessor, Compiler, Linker
     Extract Compilation & Preprocessor

Also see the companion volume: Applying C






Related Articles

Remote C/C++ Development With NetBeans

Raspberry Pi And The IoT In C

Getting Started With C/C++ On The Micro:bit


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin



Love Learning With Udacity

To celebrate Valentine's Day, Udacity has a one-week promotion for new subscribers with 40% of the first month's payment. This seems like a good incentive for trying it out. Here we look at four cours [ ... ]

Microsoft Introduces SharePoint Embedded VSCode Extension

Microsoft has released a preview version of a SharePoint Embedded Visual Studio Code extension, describing it as a new tool for developers who want to get started with SharePoint Embedded application  [ ... ]

More News


raspberry pi books



or email your comment to:


Last Updated ( Tuesday, 11 September 2018 )