gtk+ 2.0 실행시 문제

kksir의 이미지

안녕하세요.
현재 보고 있는 문서는
http://gtk.org/tutorial/c58.html
gtk 2.0 tutorial 을 보고 있습니다.
여기 3장에 보면 간단한 코드가 나오는데
그 코드는 다음과 같습니다.
===================================
#include

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;
}
===================================

그런데 이 코드를
======================================
gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`
======================================
다음과 같이 컴파일 하면
다음과 같은 에러가 납니다.
======================================
In file included from /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h:33,
from /usr/include/gtk-2.0/gdk/gdkpixbuf.h:33,
from /usr/include/gtk-2.0/gdk/gdkcairo.h:24,
from /usr/include/gtk-2.0/gdk/gdk.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:31,
from base.c:1:
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:169: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:169: warning: data definition has no type or storage class
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:190: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:190: warning: data definition has no type or storage class
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:207: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:207: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtk.h:31,
from base.c:1:
/usr/include/gtk-2.0/gdk/gdk.h:69: error: syntax error before ‘*’ token
In file included from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
from /usr/include/gtk-2.0/gtk/gtkcontainer.h:33,
from /usr/include/gtk-2.0/gtk/gtkbin.h:32,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:33,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:28,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtkobject.h:207: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkobject.h:207: warning: data definition has no type or storage class
/usr/include/gtk-2.0/gtk/gtkobject.h:210: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkobject.h:210: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtkcontainer.h:33,
from /usr/include/gtk-2.0/gtk/gtkbin.h:32,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:33,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:28,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtkwidget.h:447: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkwidget.h:447: warning: data definition has no type or storage class
/usr/include/gtk-2.0/gtk/gtkwidget.h:719: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkwidget.h:719: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtkbin.h:32,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:33,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:28,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtkcontainer.h:174: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkcontainer.h:174: warning: data definition has no type or storage class
/usr/include/gtk-2.0/gtk/gtkcontainer.h:178: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkcontainer.h:178: warning: data definition has no type or storage class
/usr/include/gtk-2.0/gtk/gtkcontainer.h:182: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkcontainer.h:182: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:28,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtkdialog.h:141: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkdialog.h:141: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtk.h:32,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtkaboutdialog.h:65: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkaboutdialog.h:65: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtkcelllayout.h:26,
from /usr/include/gtk-2.0/gtk/gtk.h:49,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h:127: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h:127: warning: data definition has no type or storage class
/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h:142: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h:142: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtk.h:49,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtkcelllayout.h:83: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkcelllayout.h:83: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtkcombobox.h:25,
from /usr/include/gtk-2.0/gtk/gtk.h:65,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtktreeview.h:170: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtktreeview.h:170: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtk.h:82,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h:58: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h:58: warning: data definition has no type or storage class
/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h:64: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h:64: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtk.h:114,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtkmain.h:99: error: syntax error before ‘GOptionEntry’
/usr/include/gtk-2.0/gtk/gtkmain.h:103: error: syntax error before ‘*’ token
/usr/include/gtk-2.0/gtk/gtkmain.h:103: warning: data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtk.h:158,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtktextbuffer.h:187: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtktextbuffer.h:187: warning: data definition has no type or storage class
/usr/include/gtk-2.0/gtk/gtktextbuffer.h:194: error: syntax error before ‘G_GNUC_NULL_TERMINATED’
/usr/include/gtk-2.0/gtk/gtktextbuffer.h:194: warning: data definition has no type or storage class

======================================

무슨 문제일까요 ㅜㅜ

데비안을 쓰기에 관련 라이브러리는 모두 설치한 상태 입니다.

익명사용자의 이미지

튜토리얼에서는 include 라이브러리가 명시된 소스인 반면에
여기에 쓰신 글에서는 라이브러리가 명시되지 않았군요.
인용상의 실수인가요, 아니면 정말 인크루딩 라이브러리를 명시하지 않은건가요?

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.