need help with gcc

J

jimgardener

forgive me if this is off topic..
i am new to c programming with gcc(using cygwin on WinXP)
I have gtk in my cygwin installation (in lib\gtk-2.0)..and was trying
to compile c code that uses gtk widgets..

...i tried the first example from gtk tutorial(http://www.gtk.org/
tutorial/) and used

gcc mycode.c -o mycode `pkg-config --cflags --libs gtk-2.0`
to compile it
i have pkg-config.exe in the cygwin/bin folder (which is set in
PATH)and still i get error msg
'gcc: `pkg-config: No such file or directory
gcc: gtk-2.0`: No such file or directory
cc1: error: unrecognized command line option "-fcflags"
cc1: error: unrecognized command line option "-flibs"

can anyone tell me how i can get this correctly compiled?
jim
 
F

Flash Gordon

jimgardener wrote, On 19/01/08 07:45:
forgive me if this is off topic..

It is. In future please check what is topical *before* posting somewhere.

gcc mycode.c -o mycode `pkg-config --cflags --libs gtk-2.0`
to compile it
i have pkg-config.exe in the cygwin/bin folder (which is set in
PATH)and still i get error msg
'gcc: `pkg-config: No such file or directory

<snip>

I suggest asking on the Cygwin mailing lists where they will know how to
get things correctly configured in Cygwin. This is nothing to do with C.
 
J

jimgardener

I suggest asking on the Cygwin mailing lists where they will know how to
get things correctly configured in Cygwin. This is nothing to do with C.
--

sorry FG,..beginner's blunder..
in fact i posted this qn to windows.cygwin grp and there was no
response..
anyway thanx for the advise..will be more careful
jim
 
F

Flash Gordon

jimgardener wrote, On 19/01/08 14:16:
sorry FG,..beginner's blunder..
in fact i posted this qn to windows.cygwin grp and there was no
response..

Try the mailing lists rather than a group.
anyway thanx for the advise..will be more careful

No problem.
 
P

Pierre Asselin

Okay, so we already know that this is off-topic, but

jimgardener said:
[ ... ] and still i get error msg
'gcc: `pkg-config: No such file or directory
^
|
+----- notice the backtick

Is this the *exact* error message ? It's as if your shell treated
the backtick as an ordinary character instead of the beginning of
a shell escape. It passed the string <<`pkg-config>> to gcc as a
command-line argument and gcc complained that no such source file
exists. After that it went from bad to worse. You *are* typing
this in a cygwin shell as opposed to a DOS box, right?

Any luck with better cygwin forums ? I haven't looked at www.cygwin.org
in a long time, but you might find good pointers there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top