This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem including a libraray...
- From: Andrew Haley <aph-gcc at littlepinkcloud dot COM>
- To: Mad <magnusdreyer at hotmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 3 May 2007 09:47:03 +0100
- Subject: Re: Problem including a libraray...
- References: <10300602.post@talk.nabble.com>
Mad writes:
>
> Hi,
> I am trying to compile a program that uses mxml lib, and the program
> compiles on debian with mxml installed with apt-get install. I'am then
> trying to compile on a linux with library installed in the following
> directory /home/lala/mxml-2.3/
> I try to compile with the following Makefile :
>
> CC=gcc
> CFLAGS=-c -Wall -B /home/smartpit/mxml-2.3/
> LDFLAGS=-lpthread -lrt -static -mxml -B /home/smartpit/mxml-2.3/
> SOURCES=canmessage.c logfile.c messagequeue.c modem.c smsmessage.c
> testmodul.c $
> OBJECTS=$(SOURCES:.c=.o)
> EXECUTABLE=dataserver_static
>
> all: $(SOURCES) $(EXECUTABLE)
>
> $(EXECUTABLE): $(OBJECTS)
> $(CC) $(OBJECTS) $(LDFLAGS) -o $@
>
> .c.o:
> $(CC) $(CFLAGS) $< -o $@
>
> clean:
> rm -rf *.o
>
>
> But get a lot of errors like "undefined reference to `mxmlFindElement'"
> I don't know how to have that library included.?
Your LDFLAGS are completely FUBAR. What is
-static -mxml -B /home/smartpit/mxml-2.3/
supposed to achieve? This use of -B is really weird.
Andrew.