This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem including a libraray...


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]