You are linking the same program to Gtk+2.0 and Gtk+3.0. And that will not work.
It is easy to check: just run the pkg-config
command standalone. BTW, you do not need to repeat --libs
so many times, and since we are looking for linking errors, I'm ommiting the --cflags
for clarity:
$ pkg-config --libs gtk+-2.0 clutter-gtk-1.0 gthread-2.0
Now, it writes a lot of library names, but if you look carefully you'll find these ones:
... -lgtk-x11-2.0 ... -lgtk-3 ...
But where do they come from? Well, the Gtk+-2 part is easy: you are asking for it in the command line! The Gtk+-3 part has only one candidate:
$ pkg-config --libs clutter-gtk-1.0
... -lgtk-3 ...
Bingo! So Clutter-gtk is a Gtk+-3 library. And so should be your program is you want to use Clutter-gtk.
The solutions to your problem are:
- Port your program to Gtk+-3 and change your compiler command accordingly.
- Use a different version of Clutter-gtk that uses Gtk+-2. I think you can choose the dependency if you compile Clutter-gtk yourself.
- Do not use Clutter-gtk.