Steve Franks wrote: >Hi all, > >fyi: I'm using WinARM, not a home-built distribution. I think WinARM's >fantastic, btw. > >So, I'm getting the following errors that I can't get rid of: > >C:\projects\arm\examples\knightrider/main.cpp:41: undefined reference to >`SetNativeSpeed(unsigned long)' >C:\projects\arm\examples\knightrider/main.cpp:48: undefined reference to >`ioctl(int, unsigned long, void*)' > > > The GNU linker does not do circular resolution of symbols, for example, symbol foo is in 'libbar.a', when linking in with the 'libjunk.a' archive, this would fail to give libjunk.a resolving of 'foo': INPUT ( -lbar -ljunk ) This would solve the problem: INPUT ( -lbar -ljunk -lbar ) GNU ld links "forward" resolving against successive objects to resolve symbols, it does not consider previously known references that may have appeared in proir objects (libs, *.o). This may sound "wrong" but there are many situations where this behavior is desirable (to overload a known symbol such as your own version of strcpy() for example). >Obviously, my makefile can locate newlib-lpc, but I'm tearing out my hair >trying to fix it. I've tried "-lnewlib-lpc" linker option, > >vpath %.o C:\WinARM\arm-elf\lib >vpath %.a C:\WinARM\arm-elf\lib > >and > >-LC:\WinARM\arm-elf\lib > >And nothing works. I have no idea how the linker points to the lib dirs, >because I didn't originally see lib dirs pointed to anywhere in the makefile >like include dirs are. Where's that magic? > >Obviously, I'm not a make expert. Apologize if this is question has an easy >answer that I could look up somewhere... > >Steve > >Steve Franks, KE7BTE >Electrical & Firmware Engineer >Tucson Embedded Systems > > > > >Yahoo! Groups Links > > > > > > > > -- Tom Walsh - WN3L - Embedded Systems Consultant http://openhardware.net, http://cyberiansoftware.com "Windows? No thanks, I have work to do..." ----------------------------------------------------
Message
Re: [lpc2000] link q's
2005-12-06 by Tom Walsh
Attachments
- No local attachments were found for this message.