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


Lightbend Announces Akka 3
15/11/2024

Lightbend, the company that developed Akka, has announced Akka 3, and has changed its name to Akka. The company produces cloud-native microservices frameworks, and Akka is used for building distribute [ ... ]



IBM Updates Granite Models
28/10/2024

IBM has released new Granite models that it says provide state-of-the-art performance relative to model size. The Granite 3.0 collection includes a new, instruction-tuned, dense decoder-only LLM.


More News

 

espbook

 

Comments




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

 



Last Updated ( Tuesday, 11 September 2018 )