How to configure NetBeans C/C++ to use GraphicsMagick
Thursday, May 5, 2011 6:42:40 PM
Today I was researching for a graphics library in C/C++. Finally I've chosen GraphicsMagick, but it was not so easy to set it up for Netbeans. So for whoever has my dilemma, here are the steps:
- 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.






