I am trying to install libbow library. When i run make file the following error is generated
gcc -c -Ibow -I. -I./argp -DHAVE_LIBNSL=1 -DHAVE_STRERROR=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_RANDOM=1 -DHAVE_SRANDOM=1 -DHAVE_SETENV=1 -DHAVE_STRCHR=1 -DHAVE_STRRCHR=1 -DHAVE_ALLOCA_H=1 -g -O -Wall -Wimplicit -o array.o array.c
In file included from array.c:22:
./bow/libbow.h:2128: error: array type has incomplete element type
make: *** [array.o] Error 1The Source of libbow is : (The latest version)
Search results showed it as a compiler problem. How to resolve this? Or is there any other source for libbow?
11 Answer
The error points line 2128 of bow/libbow.h
extern struct argp_child bow_argp_children[]; It means that struct argp_child is not defined.
I noticed that in line 1346 there is a forward declaration of the structure.
struct argp_child; /* forward declare this type */The full declaration of the structure is in line 245 of argp/argp.h
To resolve this issue you can either
Use include of
argp.hinlibbow.hi.e
#include "../argp/argp.h"Copy
struct argp_childdefinition inlibbow.h(not recommended)
An other thought is that you might compiling array.c from wrong directory and -Ibow -I. -I./argp does not point to the correct directories.