Tuesday, 15 May 2012

c - gcc raises "unrecognized command line option" error with pkg-config -



c - gcc raises "unrecognized command line option" error with pkg-config -

i trying compile gtk programme using tutorial here. when issue command

gcc -o tut tut.c $(pkg-config --cflags --libs gtk+-2.0 gmodule-2.0)

i next error:

gcc: error: unrecognized command line alternative ‘-pthread -i/usr/include/gtk-2.0 -i/usr/lib/x86_64-linux-gnu/gtk-2.0/include -i/usr/include/atk-1.0 -i/usr/include/cairo -i/usr/include/gdk-pixbuf-2.0 -i/usr/include/pango-1.0 -i/usr/include/gio-unix-2.0/ -i/usr/include/freetype2 -i/usr/include/glib-2.0 -i/usr/lib/x86_64-linux-gnu/glib-2.0/include -i/usr/include/pixman-1 -i/usr/include/libpng12 -i/usr/include/harfbuzz -wl,--export-dynamic -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lfreetype -lgmodule-2.0 -lglib-2.0 ’

gcc version 4.8.2. pkg-config version 0.26. have libgtk2.0-dev installed.

i can compile simple c programs fine.

how resolve "unrecognized command" problem?

[update comment]

i using zsh.

this looks shell issue.

what shell using?

in case it's not bash, give bash try.

c gcc gtk zsh pkg-config

No comments:

Post a Comment