操作系统:Fedora 18
内核:3.6.10-4.fc18.x86_64
我无法编译一个简单的 GTK 程序:
#include <gtk/gtk.h>
int main( int argc, char *argv[])
{
GtkWidget *window;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show(window);
gtk_main();
return 0;
}
命令:
[root@localhost dir]##gcc -o graph graph.c `pkg-config --libs --cflags gtk+-2.0`
/lib64/libGL.so.1: undefined reference to _glapi_tls_Dispatch
collect2: error: ld returned 1 exit status