linking libaries and specifying path in makefile

> **Possible Duplicate:** > [Linking apache libraries]( 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: 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 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
Do you get any prior error messages about missing header files?

以上就是linking libaries and specifying path in makefile的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准