Dear List readers


I’ve spent many hours searching both these mailing lists and more generally on the web to try and resolve the problem below.  Apologies in advance if this has already been solved but I haven’t encountered a working solution yet.  I’m also aware that this may be more of an Eclipse issue than Mingw, but am hoping that the group may have encountered a solution.  FYI I’m using

Windows XP Pro (but similar problems on a Win 7 system)

Eclipse Indigo M4

GTK+ 2.22.0

Mingw 20101030


I have a fully working Mingw/Msys setup and am able to compile GTK+ applications from the command line within MSys using pkg-config

(i.e. gcc `pkg-config –cflags gtk+2.0 libglade2.0` foo.c ` pkg-config –libs gtk+2.0 libglade2.0`)


Previously I have only be able to use Eclipse to compile GTK+ apps with Mingw by cut/paste all cflags and libs output produced by pkg-config into the relevant compiler build settings on Eclipse.  Given that I have many different apps and libraries, many of which use GTK+ this is painful in the extreme


What I’d like to be able to do is to add the `pkg-config <blah>` commands to Properties->C/C++ Build->Settings->Tool Settings within Eclipse.  However all attempts to build result in

gcc -Iworkspace\include -O0 -g3 -Wall -c -fmessage-length=0 -mwindows `pkg-config --cflags gtk+-2.0 libglade-2.0` -o ext_trig.o ..\ext_trig.c

cc1.exe: error: unrecognized command line option "-fcflags"

gcc: `pkg-config: No such file or directory

gcc: gtk+-2.0: No such file or directory

gcc: libglade-2.0`: No such file or directory

Build error occurred, build is stopped

Time consumed: 344  ms. 


I’m assuming that this is because Eclipse is using the standard windows shell and is thus unable to interpret the back-tick syntax.  Do any of the users on this group know how to encourage Eclipse to co-operate with MSys shell and thereby get the pkg-config command to play nicely?


Many thanks in advance for your assistance