NetBeans doesn't have /C++ support by default. You need to install a plugin for this. The C/C++ plugin is not available (yet?) for NB17 so something special has to be done to get the existing C/C++ plugin into Netbeans.
Open NetBeans
Select Tools -> Plugins
Select Settings
Make sure you also tick the checkbox next to NetBeans 8.2 Plugin Portal
Select Available Plugins (x)
Click the Check for Newest button at the top of the screen to be sure you have the latest and greatest versions of the plugins
Search for C/C++ and tick the checkbox
Press the Install button at the bottom of the screen: the installation will start and you will be asked to agree with the license
Download will start and you will be asked again during the installation process to agree with the signing
After some time the installation should be successfully finished: you now have the C/C++ plugin installed
Some screenshots make things clear:
Now that the C/C++ plugin is installed it's time to create a new project for a C/C++ program.
Select File -> New Project
In the Categories list, select C/C++
In the Projects list select C/C++ Application (we're going to make a simple console app at first)
Press Next
Give the project a name, location and folder (on the Windows PC)
Leave the Project Makefile Name as it is: Makefile
Tick the checkbox Create Main File and select the C/C++_ variant you want to use
For Build Host, select localhost if you want to make a Windows C/C++ application or select the RPi host if you want to run it on a Raspberry Pi
See the section Add remote C/C++ development for the RPi on how to setup NetBeans to develop C/C++ applications on the Raspberry Pi
Based upon the Build Host selection, choose the corresponding Tool Collection
For Windows this can be quite a few (Cygwin, CLang, MingW, WinAvr,..._
For Raspberry Pi it mostly will be limited to the GNU compiler
Click the Finish button to create the new C/C++ project
See below images for detailed information.
Sometimes it's necessary to add extra libraries in the linking process. An example is when you want to use wiringPi in your C/C++ applications.
Next to the header file inclusion (#include <wiringPi.h>) you also need the wiringPi library itself.
To get the library in the linking process, do the following:
Right-click on the project
Select Properties
Open the Build -> Linker section
Click in the area next to the Additional Options section (bottom of the screen)
Add -l wiringPi
If you now compile an application that needs wiringPi functionality the wiringPi library will make sure the linker will find all necessary functions.
Below is a screenshot to show the addition of extra libraries: