Makefile: 448: *** отсутствует разделитель. Стоп. ошибка

Учебник, которым я пользуюсь, - мир приветствия automake. Я компилирую код с использованием GTK + 2 и языка C

hp@ubuntu:~/amhello$ autoreconf --install
configure.ac:2: installing `./install-sh'
configure.ac:2: installing `./missing'
src/Makefile.am: installing `./depcomp'
hp@ubuntu:~/amhello$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
hp@ubuntu:~/amhello$ make
make  all-recursive
make[1]: Entering directory `/home/hp/amhello'
Making all in src
make[2]: Entering directory `/home/hp/amhello/src'
Makefile:448: *** missing separator.  Stop.
make[2]: Leaving directory `/home/hp/amhello/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/hp/amhello'
make: *** [all] Error 2

Это номер строки 448 файла Makefile ~/amhello % cat src/Makefile.amz

Мой код C находится ниже

#include<config.h>
#include<stdio.h>
#include<gtk/gtk.h>

void static call(GtkWidget *widget,gpointer data)
{
g_print("%s \n",(gchar*) data);
}
int main(int agrc, char *agrv[])
{
gtk_init(&agrc,&agrv);
GtkWidget *window,*button;
window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(window,"delete-event",G_CALLBACK(gtk_main_quit),NULL);
gtk_window_set_title(GTK_WINDOW(window),"one button");
button=gtk_button_new_with_label("hello world");
g_signal_connect(button,"clicked",G_CALLBACK(call),(gpointer) "hello world");
gtk_container_set_border_width(GTK_CONTAINER(window),10);
gtk_container_add(GTK_CONTAINER(window),button);
gtk_widget_show_all(window);
gtk_main();
return (0);
}

Содержание src / Makefile.am приведено ниже

bin_PROGRAMS = hello
hello_SOURCES = main.c

Я выяснил, в чем была ошибка, теперь другая ошибка возникает, когда я использую make команда

hp@ubuntu:~/amhello$ make
make  all-recursive
make[1]: Entering directory `/home/hp/amhello'
Making all in src
make[2]: Entering directory `/home/hp/amhello/src'
gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o    main.o main.c
main.c:3:20: fatal error: gtk/gtk.h: No such file or directory
compilation terminated.
make[2]: *** [main.o] Error 1
make[2]: Leaving directory `/home/hp/amhello/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/hp/amhello'
make: *** [all] Error 2
1
задан 18 May 2015 в 17:05

0 ответов

Другие вопросы по тегам:

Похожие вопросы: