Visualizzazione dei risultati da 1 a 6 su 6

Discussione: [C] - Errore GTK

  1. #1

    [C] - Errore GTK

    Salve, ogni volta che provo a compilare un programma che utilizza la libreria gtk/gtk.h ottengo un output simile:
    -------------------------------
    In file included from /usr/include/gtk/gtkentry.h:32,
    from /usr/include/gtk/gtkcolorsel.h:35,
    from /usr/include/gtk/gtk.h:48,
    from ciao.c:1:
    /usr/include/gtk/gtkeditable.h:50: parse error before "guint32"
    /usr/include/gtk/gtkeditable.h:54: field `widget' has incomplete type
    /usr/include/gtk/gtkeditable.h:57: parse error before "guint"
    /usr/include/gtk/gtkeditable.h:60: parse error before "selection_end_pos"
    /usr/include/gtk/gtkeditable.h:61: parse error before "has_selection"
    /usr/include/gtk/gtkeditable.h:69: parse error before '*' token
    /usr/include/gtk/gtkeditable.h:70: parse error before '}' token
    /usr/include/gtk/gtkeditable.h:74: field `parent_class' has incomplete type
    /usr/include/gtk/gtkeditable.h:79: parse error before '*' token
    /usr/include/gtk/gtkeditable.h:120: parse error before "gchar"
    /usr/include/gtk/gtkeditable.h:128: parse error before '}' token
    /usr/include/gtk/gtkeditable.h:130: parse error before "gtk_editable_get_type"
    /usr/include/gtk/gtkeditable.h:135: parse error before '*' token
    /usr/include/gtk/gtkeditable.h:141: parse error before '*' token
    /usr/include/gtk/gtkeditable.h:149: parse error before "guint32"
    /usr/include/gtk/gtkeditable.h:155: `gtk_editable_get_position' declared as function returning a function
    In file included from /usr/include/gtk/gtkcolorsel.h:35,
    from /usr/include/gtk/gtk.h:48,
    from ciao.c:1:
    /usr/include/gtk/gtkentry.h:52: field `editable' has incomplete type
    /usr/include/gtk/gtkentry.h:57: parse error before "GdkWChar"
    /usr/include/gtk/gtkentry.h:60: parse error before "text_length"
    /usr/include/gtk/gtkentry.h:61: parse error before "text_max_length"
    /usr/include/gtk/gtkentry.h:63: parse error before "visible"
    /usr/include/gtk/gtkentry.h:64: conflicting types for `timer'
    /usr/include/gtk/gtkrange.h:113: previous declaration of `timer'
    /usr/include/gtk/gtkentry.h:65: parse error before "button"
    /usr/include/gtk/gtkentry.h:65: conflicting types for `button'
    /usr/include/gtk/gtkclist.h:324: previous declaration of `button'
    /usr/include/gtk/gtkentry.h:72: parse error before '*' token
    /usr/include/gtk/gtkentry.h:74: parse error before "text_mb_dirty"
    /usr/include/gtk/gtkentry.h:82: field `parent_class' has incomplete type
    /usr/include/gtk/gtkentry.h:85: parse error before "gtk_entry_get_type"
    /usr/include/gtk/gtkentry.h:87: parse error before "max"
    /usr/include/gtk/gtkentry.h:89: parse error before '*' token
    /usr/include/gtk/gtkentry.h:91: parse error before '*' token
    /usr/include/gtk/gtkentry.h:93: parse error before '*' token
    /usr/include/gtk/gtkentry.h:97: parse error before '*' token
    /usr/include/gtk/gtkentry.h:107: parse error before "guint16"
    In file included from /usr/include/gtk/gtkcolorsel.h:36,
    from /usr/include/gtk/gtk.h:48,
    from ciao.c:1:
    -------------------------------
    Ne ho riportato solo una parte.
    Premetto che ho provato a compilare solo sorgenti già fatti per vedere se la compilazione avveniva, ma nulla.
    Attendo consiglio.

  2. #2
    Utente di HTML.it L'avatar di Zalex
    Registrato dal
    Aug 2001
    Messaggi
    357
    come compili?

  3. #3
    Ho provato a compilare in diversi modi con il gcc.

    Il classico gcc nomefile.c

    Oppure il comando riportato nei tutorial che ho letto:

    gcc -Wall -g nomefile.c -o nomefile gtk-config --cflags \ gtk-config --libs

    Linko anche uno dei tutorial a cui ho fatto riferimento: http://www.fifi.org/doc/libgtk1.2-do...tk_tut_it.html

  4. #4
    Utente di HTML.it L'avatar di Zalex
    Registrato dal
    Aug 2001
    Messaggi
    357
    gcc -Wall -g nomefile.c -o nomefile `gtk-config --cflags --libs`

  5. #5
    Utente di HTML.it L'avatar di Zalex
    Registrato dal
    Aug 2001
    Messaggi
    357
    non ci va il backslash,e mancavano le virgolette!
    prova cosi' e fammi sapere
    ciao

  6. #6
    Funziona!
    Ti ringrazio davvero molto, se posso ricambiare fammi sapere.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.