|
Problem compiling GTK apps in Anjuta
Hi,
I just emerge'd Anjuta 1.1.98. I'm trying to teach myself how to program for Linux GUI with GTK2. I've had prior experience with Windows, but none for GTK nor using gcc.
I've copied the example GTK2 "Hello World" program from gtk.org. I selected gtk+-x11-2.0 in Compiler/Linker Settings, and went to Build -> Build. This executes:
gcc `pkg-config --cflags gtk+-x11-2.0` "gtktest.c" `pkg-config --libs gtk+-x11-2.0` -o "gtktest"
which seems nearly 100% similar to the tutorial's suggested compiling command. In fact, running this command in a terminal creates a 100% functional executable. However, Anjuta gives the following errors:
gcc: `pkg-config: No such file or directory
gcc: gtk+-x11-2.0`: No such file or directory
gcc: `pkg-config: No such file or directory
gcc: gtk+-x11-2.0`: No such file or directory
cc1: error: unrecognized option `-fcflags'
cc1: error: unrecognized option `-flibs'
This looks to me like Anjuta is just sending the command to GCC without first parsing it like a shell would (and replacing the pkg-config commands with the actual output of pkg-config). How can I fix this? Should I run it through /bin/sh or something?
Thanks for any help!
|