Fórum Ubuntu Linux - PT

Suporte Técnico => Programação e Scripts => Tópico iniciado por: Roberto Ramos em 06 de Maio de 2010, 09:48

Título: [Resolvido]Erro ao compilar com GCC
Enviado por: Roberto Ramos em 06 de Maio de 2010, 09:48
Tentei compilar com o gcc com o seguinte comando:

Citar
gcc -o alo alo.c -Wall -g `gtk-config --cflags --libs`

e o retorno que tenho é este:
Citar
No command 'gtk-config' found, did you mean:
 Command 'gts-config' from package 'libgts-bin' (universe)
gtk-config: command not found
alo.c:2:21: error: gtk/gtk.h: Arquivo ou diretório não encontrado
alo.c: In function ‘main’:
alo.c:5: error: ‘GtkWidget’ undeclared (first use in this function)
alo.c:5: error: (Each undeclared identifier is reported only once
alo.c:5: error: for each function it appears in.)
alo.c:5: error: ‘janela’ undeclared (first use in this function)
alo.c:6: warning: implicit declaration of function ‘gtk_init’
alo.c:7: warning: implicit declaration of function ‘gtk_window_new’
alo.c:7: error: ‘GTK_WINDOW_TOPLEVEL’ undeclared (first use in this function)
alo.c:8: warning: implicit declaration of function ‘gtk_window_set_title’
alo.c:8: warning: implicit declaration of function ‘GTK_WINDOW’
alo.c:9: warning: implicit declaration of function ‘gtk_widget_show’
alo.c:10: warning: implicit declaration of function ‘gtk_main’

usei este comando para ver a versão do GTK:
Citar
gtk-config --version

e o resultado foi este:
Citar
No command 'gtk-config' found, did you mean:
 Command 'gts-config' from package 'libgts-bin' (universe)
gtk-config: command not found

Verifiquei e meus pacotes para GTK estão todos instalados, não entendo pq não consigo compilar, se puderem me ajudar agradeço.

PS.: Procurei aqui no forum mais não conseguir achar algo parecido por isso criei o tópico... ;)
Título: Re: Erro ao compilar com GCC
Enviado por: velox256 em 06 de Maio de 2010, 10:47
Instale os pacotes libgtk 1.2 e 2.0 junto com seus respectivos pacotes dev que o negócio deverá funcionar.
Título: Re: Erro ao compilar com GCC
Enviado por: Roberto Ramos em 06 de Maio de 2010, 15:17
Obg Velox256,

Consegui resolver instalando essa e as suas dependencias...ABÇ!!!  ;)