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

 Cbookcover

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. 

 

services

 

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.  

 

properties

 

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:

 

hello

 

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. 

 

output

 

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

<ASIN:1871962609>

<ASIN:1871962463>

<ASIN:1871962617>

<ASIN:1871962455>

 

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

 

Banner


Ibis 8 Adds Streaming
05/03/2024

Ibis 8.0 has been released with stream processing backends. The new release includes Apache Flink as a streaming backend, and RisingWave, a streaming database backend. There's also a new batch backend [ ... ]



Quantum Computers Really Are A One Trick Pony
17/03/2024

Google is offering $5 million if you can think up a use for a quantum computer. Wait, I thought quantum computers were the next big thing, a revolution! Surely we know what they can do?


More News

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

 



Last Updated ( Tuesday, 11 September 2018 )