Re: Problem including a libraray...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, I tried alot, also without the -B, -static is to make a static build..
Magnus


Andrew Haley-5 wrote:
> 
> 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-including-a-libraray...-tf3685127.html#a10301135
Sent from the gcc - Help mailing list archive at Nabble.com.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux