How to Run C/C++ Program in Netbeans on Windows
Open each of the following links in separate tabs., Download Netbeans Select the Graphic on the right Accept the user agreement, and then select the correct software from the list., Download Compiler and Debugger Select the Correct File for your...
Step-by-Step Guide
-
Step 1: Open each of the following links in separate tabs.
Netbeans Compiler and Debugger -
Step 2: Download Netbeans Select the Graphic on the right Accept the user agreement
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. ,,,,,, Click Next It will install the parts and then ask if you want shortcuts, you do not need these ,,,,,,,,,,,,,,,,,,, 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 -
Step 3: and then select the correct software from the list.
-
Step 4: Download Compiler and Debugger Select the Correct File for your System and Save it to your desktop
-
Step 5: Create a Folder on the Desktop and name it Cygwin
-
Step 6: Open the Cygwin Installer Click the "Next" button on the window that comes up
-
Step 7: Click Install from Internet
-
Step 8: Click Next
-
Step 9: then Click Next on the Second window Make sure on the Third Window that the path is setup to the desktop folder
-
Step 10: Select a Download Site and click Next Really does not matter what site is chosen
-
Step 11: however download speed may be affected
-
Step 12: Install Compiler and Debugger On the Window that pops-up select the '+' next to Devel Find the files called gcc-core
-
Step 13: gcc-g++
-
Step 14: gdb: GNU Debugger
-
Step 15: and 'make'
-
Step 16: and click the 'Skip' button to the left ONCE.
-
Step 17: Create the Cygwin Path Open your control panel and select "System and Security"
-
Step 18: then select "System" Click Advanced System Settings Near the bottom of the new window there will be a button called "Environmental Variables"
-
Step 19: select it In the window that pops up scroll down to Path
-
Step 20: select it and click Edit At the end of the highlighted text (DON'T DELETE IT) add
-
Step 21: with no spaces at all
-
Step 22: ";cygwin-directory\bin"
-
Step 23: Open the Netbeans Installer Allow program to run
-
Step 24: if asked for permission
-
Step 25: and wait for installer to configure
-
Step 26: When 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
-
Step 27: Open Netbeans
-
Step 28: Click the "My Netbeans" tab
-
Step 29: Click Install Plugins In the search bar type C/C++ Select the result that has the same name and click it Click Install
-
Step 30: Click Next in the new window Accept the User Agreement and Click Install
-
Step 31: Exit the Plugin Window
-
Step 32: Click File in the top left corner
-
Step 33: Click New Project
-
Step 34: Select C/C++ in the new window Select C++ Application on the right side Select Next
-
Step 35: Name the Project whatever you'd like
-
Step 36: and make sure that the tool collection field has Cygwin in it Click Finish
-
Step 37: Double-Click the Project on the left-side of the screen Click the '+' next to Source Files
-
Step 38: Double-Click main.cpp
-
Step 39: Insert the phrase (No quotes) "#include <iostream>" underneath the other include phrase
-
Step 40: Insert any code inside the curly brackets of the main function For example insert (no quotes) "cout << "Hello World" << endl;"
-
Step 41: Click the hammer icon at the top to build the solution If done correctly at the bottom in green
-
Step 42: a message will appear that reads "Build Successful"
-
Step 43: Run the code by clicking the play button At the bottom your output should be there
-
Step 44: followed by a message that reads "Run Successful" with total runtime of your program
-
Step 45: Be sure to install the Cygwin compiler and debugger first.
Detailed Guide
Netbeans Compiler and Debugger
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. ,,,,,, Click Next It will install the parts and then ask if you want shortcuts, you do not need these ,,,,,,,,,,,,,,,,,,, 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
About the Author
Brian Nelson
Committed to making lifestyle accessible and understandable for everyone.
Rate This Guide
How helpful was this guide? Click to rate: