|
编译又出现问题
提示如下[code:1][root@localhost window]# make
gcc -o window window.c `pkg-config --cflags --libs gtk+-2.0`
window.c: In function `main':
window.c:10: stray '\357' in program
window.c:10: stray '\274' in program
window.c:10: stray '\233' in program
window.c:11: parse error before "gtk_window_set_default_size"
make: *** [all] Error 1
[/code:1]
代码是[code:1]#include <gtk/gtk.h>
int main (int argc,char* argv[])
{
GtkWidget *window;
gtk_init(&argc,&argv);
window = gtk_window_new( GTK_WINDOW_TOPLEVEL);
g_singal_connect(G_OBJECT(window),"delete_event",
G_CALLBACK(gtk_main_quit),NULL);
gtk_window_set_title(GTK_WINDOW(window),"一个功能完善的窗口");
gtk_window_set_default_size(GTK_WINDOW(window),500,100);
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
gtk_widget_show(window);
gtk_main();
return FALSE;
}
[/code:1]
很简单的程序阿,学门语言怎么那么难,刚接触linux,什么都不懂[/quote] |
|