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...

45 Steps 1 min read Advanced

Step-by-Step Guide

  1. Step 1: Open each of the following links in separate tabs.

    Netbeans Compiler and Debugger
  2. 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
  3. Step 3: and then select the correct software from the list.

  4. Step 4: Download Compiler and Debugger Select the Correct File for your System and Save it to your desktop

  5. Step 5: Create a Folder on the Desktop and name it Cygwin

  6. Step 6: Open the Cygwin Installer Click the "Next" button on the window that comes up

  7. Step 7: Click Install from Internet

  8. Step 8: Click Next

  9. Step 9: then Click Next on the Second window Make sure on the Third Window that the path is setup to the desktop folder

  10. Step 10: Select a Download Site and click Next Really does not matter what site is chosen

  11. Step 11: however download speed may be affected

  12. Step 12: Install Compiler and Debugger On the Window that pops-up select the '+' next to Devel Find the files called gcc-core

  13. Step 13: gcc-g++

  14. Step 14: gdb: GNU Debugger

  15. Step 15: and 'make'

  16. Step 16: and click the 'Skip' button to the left ONCE.

  17. Step 17: Create the Cygwin Path Open your control panel and select "System and Security"

  18. Step 18: then select "System" Click Advanced System Settings Near the bottom of the new window there will be a button called "Environmental Variables"

  19. Step 19: select it In the window that pops up scroll down to Path

  20. Step 20: select it and click Edit At the end of the highlighted text (DON'T DELETE IT) add

  21. Step 21: with no spaces at all

  22. Step 22: ";cygwin-directory\bin"

  23. Step 23: Open the Netbeans Installer Allow program to run

  24. Step 24: if asked for permission

  25. Step 25: and wait for installer to configure

  26. 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

  27. Step 27: Open Netbeans

  28. Step 28: Click the "My Netbeans" tab

  29. 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

  30. Step 30: Click Next in the new window Accept the User Agreement and Click Install

  31. Step 31: Exit the Plugin Window

  32. Step 32: Click File in the top left corner

  33. Step 33: Click New Project

  34. Step 34: Select C/C++ in the new window Select C++ Application on the right side Select Next

  35. Step 35: Name the Project whatever you'd like

  36. Step 36: and make sure that the tool collection field has Cygwin in it Click Finish

  37. Step 37: Double-Click the Project on the left-side of the screen Click the '+' next to Source Files

  38. Step 38: Double-Click main.cpp

  39. Step 39: Insert the phrase (No quotes) "#include <iostream>" underneath the other include phrase

  40. Step 40: Insert any code inside the curly brackets of the main function For example insert (no quotes) "cout << "Hello World" << endl;"

  41. Step 41: Click the hammer icon at the top to build the solution If done correctly at the bottom in green

  42. Step 42: a message will appear that reads "Build Successful"

  43. Step 43: Run the code by clicking the play button At the bottom your output should be there

  44. Step 44: followed by a message that reads "Run Successful" with total runtime of your program

  45. 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

B

Brian Nelson

Committed to making lifestyle accessible and understandable for everyone.

45 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: