How to Run C/C++ Program in Netbeans on Windows
Part 1 of 5:
Downloading the Components
- Open each of the following links in separate tabs.
- Netbeans
- Compiler and Debugger
- Download 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.
- Select the Graphic on the right
- Download Compiler and Debugger
- Select the Correct File for your System and Save it to your desktop
- Select the Correct File for your System and Save it to your desktop
Part 2 of 5:
Installing Cygwin Compiler and Debugger
- Create a Folder on the Desktop and name it Cygwin
- Open the Cygwin Installer
- Click the "Next" button on the window that comes up
- Click Install from Internet, Click Next, then Click Next on the Second window
- Make sure on the Third Window that the path is setup to the desktop folder
- Make sure on the Third Window that the path is setup to the desktop folder
- Select a Download Site and click Next
- Really does not matter what site is chosen, however download speed may be affected
- Install Compiler and Debugger
- On the Window that pops-up select the '+' next to Devel
- Find the files called gcc-core, gcc-g++, gdb: GNU Debugger, and 'make', and click the 'Skip' button to the left ONCE.
- Click Next
- It will install the parts and then ask if you want shortcuts, you do not need these
- On the Window that pops-up select the '+' next to Devel
- Create 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-directorybin"
Part 3 of 5:
Installing Netbeans
- Open the Netbeans Installer
- Allow program to run, if asked for permission, and wait for installer to configure
- 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
Part 4 of 5:
Running the Program
- Open Netbeans
- Click the "My Netbeans" tab
- Click Install Plugins
- In the search bar type C/C++
- Select the result that has the same name and click it
- Click Install
- Click Next in the new window
- Accept the User Agreement and Click Install
- Exit the Plugin Window
- Click File in the top left corner
- Click New Project
- Select C/C++ in the new window
- Select C++ Application on the right side
- Select Next
- Select C++ Application on the right side
- Name the Project whatever you'd like, and make sure that the tool collection field has Cygwin in it
- Click Finish
- Double-Click the Project on the left-side of the screen
- Click the '+' next to Source Files
- Double-Click main.cpp
- Insert the phrase (No quotes) "#include " underneath the other include phrase
- Insert any code inside the curly brackets of the main function
- For example insert (no quotes) "cout << "Hello World" << endl;"
- Click the hammer icon at the top to build the solution
- If done correctly at the bottom in green, a message will appear that reads "Build Successful"
- If done correctly at the bottom in green, a message will appear that reads "Build Successful"
- Run the code by clicking the play button
- At the bottom your output should be there, followed by a message that reads "Run Successful" with total runtime of your program
- At the bottom your output should be there, followed by a message that reads "Run Successful" with total runtime of your program
Part 5 of 5:
Troubleshooting
-
- 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
3.7 ★ | 10 Vote
You should read it
- Please download more than 90 beautiful windows wallpapers for your computer
- How to Install Windows 10 on a Mac
- How to turn on the window to select the location for saving files when downloading on Chrome, Coc Coc, Firefox browsers
- How to Install VMware Player
- How to Install Software from Unsigned Developers on a Mac
- How to add 'Open command window here as administrator' to the right-click menu on Windows 10
- Two computer worms spread dangerously in Vietnam
- How to Install Windows from Ubuntu
May be interested
- How to Change Startup Program on Windows 7the startup program is saved in a special folder on the hard drive, and runs automatically when windows starts. in windows 7, installing a startup program is similar to previous versions of windows. the article below will show you how to add or disable startup programs.
- How to End a Program on a PChave you ever had a program hang and waiting for the computer to sort the problem out was not an option? this puts in effect the immediate termination of almost any irritating, hanging, unresponsive program on your pc. kill ===windows===
- What is Program Compatibility Troubleshooter in Windows 11? How to use it?program compatibility shooter is a windows tool that helps you troubleshoot application compatibility issues.
- How to leave Windows Insider Program to unsubscribe from the accountthis guide will show you how to leave the windows insider program to deregister your azure active directory (aad) or microsoft account (msa) account from the program.
- Microsoft rewarded $ 250,000 in a new bug-finding programmicrosoft finally launched a bug bounty program for security researchers and bug hunters, and then reported bugs on the latest windows operating systems and software.
- Windows Insiders program officially supports Windows 10 Syesterday (august 23, 2017), microsoft announced the official support for windows 10 s on windows insiders program. devices running windows can now register for windows insiders and download builds of this program.
- How to Run a Program on Command Promptthis wikihow teaches you how to start a program on your windows computer from within the command prompt app. you can only run programs that are installed in windows-created folders (e.g., the desktop), though you can add a program's folder...
- Steps to Fix startup program error not starting with Windows 10the startup folder is a useful utility on windows 10. it contains programs that run as soon as your pc boots up. however, you may notice that some startup programs do not launch as they should.
- How to Use Narrator on Windows 8.1even though the narrator program did have its hiccups in windows 7, microsoft has countered this problem by bringing in a new and augmented version of the narrator program in windows 8.1. there are several features present in the windows...
- How to fix 'File Is Open in Another Program' in Windows 10when using windows 10, you may have tried to delete a file or moved it to another location and encountered an error saying 'action cannot be completed because the file is open in another program'.