Does anyone know how to apply this in specifically in NetBeans IDE? I have tried to include -lgtk+-2.0 or same line as additional option but always it shows
gcc: error: gtk+-2.0: No such file or directory
If i do like this manually it works. But i want to apply it in IDE way:
gcc $(pkg-config --cflags --libs gtk+-2.0 more) -o main main.c
In Project Properties -> Build -> C Compiler, you can set as ‘Additional Options’
note the double-$, otherwise NetBeans will treat it like one of its own parameters.
It seems like you’d still need to include the additional include directory (e.g. /usr/include/gtk+-2.0) by hand, though — General->Include Directories does not let you specify a shell expression to be evaluated. It won’t stop the compilation, but it’d just make the IDE not be able to find the headers and thus give you code assistance.