- Create a new C/C++ project
- Go to Tools -> Options -> C/C++ -> Code Assistance and add the path to GraphicsMagick (in my case /usr/include/GraphicsMagick)
- Right click on your project (should be the main project, obviously) -> Properties -> Build -> C++ Compiler -> Inlude Directories and add the same folder as above
- In the same Properties window, go to Build -> Linker -> Libraries and choose Add Option -> Other Options and fill in this `GraphicsMagick++-config --cppflags --cxxflags --ldflags --libs` (note the backticks!!!)
That's all. Now your project should build and run in NetBeans.
Note: this was tested on NetBeans 7 but it should work on other version also.