guoning82 发表于 2006-3-30 10:49:01

glade编译时出错

# make
source='callbacks.c' object='callbacks.o' libtool=no \
depfile='.deps/callbacks.Po' tmpdepfile='.deps/callbacks.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H
-I/usr/lib/gnome-libs/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/orbit-1.0 -I/usr/include/gtk-1.2 -I/usr/X11R6/include-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
-g -O2 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations-c `test -f
'callbacks.c' || echo './'`callbacks.c
callbacks.c: In function `on_ok_button1_clicked':
callbacks.c:25: warning: implicit declaration of function `gtk_file_chooser_get_filename'
callbacks.c:25: warning: implicit declaration of function `GTK_FILE_CHOSER'
callbacks.c:25: warning: assignment makes pointer from integer without a cast
gcc-g -O2 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations    -o project3main.o support.o interface.o callbacks.o -rdynamic -L/usr/lib -L/usr/X11R6/lib -rdynamic -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -ldl -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -lglib
callbacks.o(.text+0x29): In function `on_ok_button1_clicked':
/root/Projects/project3/src/callbacks.c:25: undefined reference to `GTK_FILE_CHOSER'
callbacks.o(.text+0x31):/root/Projects/project3/src/callbacks.c:25: undefined reference to `gtk_file_chooser_get_filename'
collect2: ld returned 1 exit status
make: *** Error 1



请问我为什么不能获取选择文件的名字,时不时用的版本有问题

yangh 发表于 2006-3-30 18:03:17

CHOOSER 才对,你少写了个 O

xLoneStar 发表于 2006-3-30 18:13:35

glade v.s. glade2

yangh 发表于 2006-3-30 18:20:33

ps: 说过不要直接用 glade 生成代码了。去 gnome-cn 搜来看一下。
页: [1]
查看完整版本: glade编译时出错