在GCC编译命令中加入-export-dynamic,如: gcc test.c -o test `pkg-config --libs --cflags gtk+-2.0 ` -export-dynamic