|
John Thanks very much, that did the trick. In fact, after looking at the Makefile I scolded myself for "slapping" it together, neatness does count. Just for the record.... responder: responder.c handlers.o Makefile common.h config.o hash.o inflight.o $(CC) -g -Wall -I/usr/include -o responder \ -L $(ROOTDIR)/lib/sofia-sip/libsofia-sip-ua/.libs \ inflight.o handlers.o hash.o config.o responder.c \ $(LDLIBS) -lsofia-sip-ua -lpthread romfs: $(ROMFSINST) -e CONFIG_USER_INITIATORRESPONDER /bin/responder clean: rm -f *.o core responder Thanks again.... ...Chris John Williams wrote: > Hi Chris, > > On Fri, Mar 27, 2009 at 2:29 AM, Chris Robson > > > I am trying to create a linked library (Sofia-SIP libraries) > within the > ./petalinux-dist/lib tree. When trying to link to those libraries it > errors out with undefines (see below). Using mb-linux-nm shows the > modules are there (see below). Following is the makefile. > thanks for the help.............chris > > make ERRORS............. > > mb-linux-gcc -L/petalinux-dist/lib/sofia-sip/libsofia-sip-ua/.libs \ > -lsofia-sip-ua -lpthread -o responder -I/usr/include \ > -g -Wall inflight.o handlers.o hash.o config.o responder.c > In file included from responder.c:8: > /usr/include/pthread.h:653: warning: ‘__regparm__’ attribute > directive > ignored > /tmp/ccxVGAQt.o: In function `EventCallBack': > /petalinux-dist/user/responder/responder.c:220: undefined > reference to > `su_root_break' > > > Try putting the the -lsofia-sip-ua parameter at the end of the gcc > commandline, rather than the beginning. Here's results from my > trivial test: > > # -llib early in the commandline - bad > [jwilliams@g613-9373 libfoo]$ gcc -L . -llib -o main main.c > main.c: In function ‘main’: > main.c:4: warning: return type of ‘main’ is not ‘int’ > /tmp/ccqaBgG7.o: In function `main': > main.c:(.text+0x12): undefined reference to `libfunc' > collect2: ld returned 1 exit status > > #-llib late in the commandline - good > [jwilliams@g613-9373 libfoo]$ gcc -L . -o main main.c -llib > main.c: In function ‘main’: > main.c:4: warning: return type of ‘main’ is not ‘int’ > > Regards, > > John > -- > John Williams, PhD, B.Eng, B.IT > PetaLogix - Linux Solutions for a Reconfigurable World > w: www.petalogix.com > +61-7-30090663 > Hotmail® is up to 70% faster. Now good news travels really fast. Find out more. |