Eu tentei criar o GTK2 para o Mac OS X EI Captain a partir do código-fonte. Mas pela variável de ambiente (INCLUDE?), Ocorreu um erro e eu não consegui construir. Por favor me ajude por conselhos?
Alguém não tem o homem que encontrou o seguinte erro?
hash.c:111:3: error: use of undeclared identifier 'free'
obstack_init (&htab->mem_pool);
^
./obstack.h:294:65: note: expanded from macro 'obstack_init'
(void () (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
^
hash.c:53:28: note: expanded from macro 'obstack_chunk_free'
#define obstack_chunk_free free
^
Eu acho que o gcc não pode encontrar o arquivo de inclusão malloc.h.
Eu não entendo que está correto.
Primeiro, baixei os pacotes a seguir. gtk + -2,24.30, glib-2.28.0, atk-1.29.2, pango-1.20.0, gdk-pixbuf-2.21.3, gettext-0.10.40
Eu executei o seguinte.
$ cd gettext-0.10.40 $ ./configure $ makeEm seguida, ocorreu o seguinte erro.
hash.c:111:3: error: use of undeclared identifier 'free'
obstack_init (&htab->mem_pool);
^
./obstack.h:294:65: note: expanded from macro 'obstack_init'
(void () (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
^
hash.c:53:28: note: expanded from macro 'obstack_chunk_free'
#define obstack_chunk_free free
^
hash.c:121:3: warning: implicit declaration of function 'free' is invalid in C99
[-Wimplicit-function-declaration]
free (htab->table);
^
1 warning and 1 error generated.
O malloc.h da distribuição usual do Linux existe em / usr / include, mas o malloc.h do Mac OS X EI Captain existe em / usr / include / sys.
Então eu executei o seguinte.
$ cd gettext-0.10.40 $ env CPPFLAGS=-I/usr/include/sys ./configure $ makeNo entanto, o mesmo erro ocorreu. É muito difícil para mim lidar.
Obrigado.