Hello,
gcc 4.4.2 c89
I am trying to link some headers and libraries in my header file. But for some reason my program doesn't seem to link.
I have in my directory src/include/apr src/libs
I have compiled the libraries and placed them in my libs and I have put the headers in the include directory.
My executable is in the src directory.
In my makefile I have specified this:
LIBS_PATH -L./lib
INC_PATH -I./include
LIBS = -libapr-1
So the current directory to where the executable is executed from.
In my lib folder I have the following library called:
libapr-1.so
And in my include/apr folder I have the following header file:
apr.h
The program is getting the header files. But I don't think it is linking the library as I don't get any errors saying that it can't find the header file.
In the file where I include the header I have done this
#include <apr/apr.h>
I do get this following error message:
In file included from include/apr.h:17,
./include/apr/apr.h:285: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘apr_int32_t’
Many thanks for any suggestions and advice,
EDIT:
LIBS_PATH -L./lib
INC_PATH -I./include
LIBS = -lapr
Error: /usr/bin/ld: cannot find -lapr
Makefile:
OBJECT_FILES = dlg_fsm.o
CFLAGS = -ggdb -Wall
FLATFORM = -DLINUX
CC = gcc
LIBS_PATH = -L./lib
INC_PATH = -I./include
LIBS = -lapr
dlg: $(OBJECT_FILES)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECT_FILES) $(FLATFORM) $(INC_PATH) $(LIBS_PATH) $(LIBS) -o dlg