I am trying to create a version of code in a bigger project that is by itself. I know the code runs in the bigger project and believe my problem is in the makefile. The makefile is trying to create RegEx.o from RegEx.h which includes GSUtils, which includes unistd.h. From here the makefile says that unistd.h is having a problem.
Here is the error I receive.
Code:
In file included from GSCUtils/GSCUtils.h:55,
from GSCUtils/RegEx.c:64:
/usr/include/unistd.h:224: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
Here is what I believe is the code that is breaking
Code:
CFLAGS := -Wall -Wno-missing-field-initializers -Wno-missing-braces -Wno-unknown-pragmas -g -O2 -std=gnu99 -DPOPSYS_LINUX
...
INCLUDES = -IGSCUtils
...
CFLAGS += ${INCLUDES}
...
GSCUtilsPROJECT = libGSCUtils.a
GSCUtilsSRCS = GSCUtils/RegEx.c
GSCUtilsOBJECTS = ${GSCUtilsSRCS:.c=.o}
...
all: ${PROJECTS}
clean:
rm -f ${PROJECTS} ${ALLOBJECTS}
...
${GSCUtilsPROJECT}: ${GSCUtilsOBJECTS}
rm -f ${GSCUtilsPROJECT}
ar -cq ${GSCUtilsPROJECT} ${GSCUtilsOBJECTS}
ranlib ${GSCUtilsPROJECT}