undefined reference to....
Hi! i am trying to compile/link a simple application that uses a library called OpenDBX. I have already compiled and installed that library. Now, i am trying to do a simple client of it.
The client (Prueba.c) is just like this: Code:
#include <stdio.h> When i try to compile that program (Prueba.c), i has this error: cc -c -o Prueba.o Prueba.c gcc -O2 -g -Wall -fmessage-length=0 -L/usr/local/lib -L/usr/local/lib/opendbx -L/usr/local/lib/pkgconfig -o Pruebas Prueba.o Prueba.o: In function `main': Prueba.c:(.text+0x3c): undefined reference to `odbx_init' Prueba.c:(.text+0x57): undefined reference to `odbx_error' collect2: ld returned 1 exit status make: *** [Pruebas] Error 1 Those functions (odbx_error and odbx_init are both defined in odbx.h (the header of openDBX y need to include). I have checked that openDBX libraries are okey. There are in /usr/local/lib , /usr/local/lib/opendbx and /usr/local/lib/pkgconfig. My makefile is like this: Code:
COMPILER = gcc Very thanks Mariano |
Quote:
Quote:
Here’s how I would modify your Makefile: Code:
COMPILER = gcc |
All times are GMT -5. The time now is 10:28 PM. |