This tutorial will take you through the process of running a C/C++ program with the Netbeans IDE (Integrated Development Environment) using screenshots as tools for understanding and clarity. This article is written for use with Windows, and is untested with other OS's. The first part of this tutorial is the download and installation guide for all of the components. If you have already completed an installation and you are sure it is correct move on to Part 4 to learn how to Run the Program.

Part 1
Part 1 of 5:

Downloading the Components

  1. 1
    Open each of the following links in separate tabs.
  2. 2
    Advertisement
  3. 3
  4. Advertisement
Part 2
Part 2 of 5:

Installing Cygwin Compiler and Debugger

  1. 1
    Create a Folder on the Desktop and name it Cygwin
  2. 2
    Open the Cygwin Installer
    • Click the "Next" button on the window that comes up
  3. 3
  4. 4
    Select a Download Site and click Next
    • Really does not matter what site is chosen, however download speed may be affected
  5. 5
    Install Compiler and Debugger
  6. 6
  7. Advertisement
Part 4
Part 4 of 5:

Running the Program

  1. 1
    Open Netbeans
  2. 2
    Click the "My Netbeans" tab
  3. 3
    Click Install Plugins
    • In the search bar type C/C++
    • Select the result that has the same name and click it
    • Click Install
  4. 4
    Click Next in the new window
    • Accept the User Agreement and Click Install
  5. 5
    Exit the Plugin Window
  6. 6
    Click File in the top left corner
  7. 7
    Click New Project
  8. 8
  9. 9
    Name the Project whatever you'd like, and make sure that the tool collection field has Cygwin in it
    • Click Finish
  10. 10
    Double-Click the Project on the left-side of the screen
    • Click the '+' next to Source Files
  11. 11
    Double-Click main.cpp
  12. 12
    Insert the phrase (No quotes) "#include <iostream>" underneath the other include phrase
  13. 13
    Insert any code inside the curly brackets of the main function
    • For example insert (no quotes) "cout << "Hello World" << endl;"
  14. 14
  15. 15
  16. Advertisement
Part 5
Part 5 of 5:

Troubleshooting

  1. 1
    • Be sure to install the Cygwin compiler and debugger first. It allows the IDE to auto-find it in your system
    • If Cygwin does not appear in the tool collection field, be sure that its path is added to the Environment Variables
    • If the project does not build or run correctly, be sure to look carefully at the final screenshot and make sure that all parts in the text editor look the same

Community Q&A

  • Question
    Which IDE is best for beginners for C, C+, and Python?
    Community Answer
    Community Answer
    CodeBlocks is great for beginners!
  • Question
    How do I plugin the CPP IDE?
    Community Answer
    Community Answer
    Get it as standalone Eclipse IDE for C/C++ Developers from eclipse.org or install using a marketplace client (e.g. drag-and-drop Install button).
Advertisement

About This Article

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time. This article has been viewed 75,980 times.
How helpful is this?
Co-authors: 3
Updated: March 24, 2016
Views: 75,980
Advertisement