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.
Learn more...
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.
Steps
Downloading the Components
-
1Open each of the following links in separate tabs.
-
2Download Netbeans
- Select the Graphic on the right
- Accept the user agreement, and then select the correct software from the list. Choose either the file ending in i586 for a 32-bit system or the file ending in x64 for a 64-bit system. Save to your Desktop.
Advertisement -
3
Installing Cygwin Compiler and Debugger
-
1Create a Folder on the Desktop and name it Cygwin
-
2Open the Cygwin Installer
- Click the "Next" button on the window that comes up
-
3
-
4Select a Download Site and click Next
- Really does not matter what site is chosen, however download speed may be affected
-
5
-
6Create the Cygwin Path
- Open your control panel and select "System and Security", then select "System"
- Click Advanced System Settings
- Near the bottom of the new window there will be a button called "Environmental Variables", select it
- In the window that pops up scroll down to Path, select it and click Edit
- At the end of the highlighted text (DON'T DELETE IT) add, with no spaces at all, ";cygwin-directory\bin"
Installing Netbeans
-
1Open the Netbeans Installer
- Allow program to run, if asked for permission, and wait for installer to configure
-
2When the installer Opens
- Click Next
- Agree to the user agreement and select Next
- Allow the installer to save and install the files on the next two windows to the default locations
- Click Install
- You can choose whether to send usage data or not
Running the Program
-
1Open Netbeans
-
2Click the "My Netbeans" tab
-
3Click Install Plugins
- In the search bar type C/C++
- Select the result that has the same name and click it
- Click Install
-
4Click Next in the new window
- Accept the User Agreement and Click Install
-
5Exit the Plugin Window
-
6Click File in the top left corner
-
7Click New Project
-
8
-
9Name the Project whatever you'd like, and make sure that the tool collection field has Cygwin in it
- Click Finish
-
10Double-Click the Project on the left-side of the screen
- Click the '+' next to Source Files
-
11Double-Click main.cpp
-
12Insert the phrase (No quotes) "#include <iostream>" underneath the other include phrase
-
13Insert any code inside the curly brackets of the main function
- For example insert (no quotes) "cout << "Hello World" << endl;"
-
14
-
15
Community Q&A
-
QuestionWhich IDE is best for beginners for C, C+, and Python?Community AnswerCodeBlocks is great for beginners!
-
QuestionHow do I plugin the CPP IDE?Community AnswerGet 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).