[ECOS] trouble linking standard C libraries
Tue Mar 23 06:55:00 GMT 2004
This is not directly related to the eCOS forum, but I am sure I get the best
Standard library issue:
I tried the following on my linux box:
$ mipsisa3-elf-ld Âo output hello.o
this gave unresolved reference errors on printf, memcpy & such standard lib
(libc) functions. I thought the linker should include the libc by default
when needed unless Âno-sdtlibsÂ so something similar is specifies in the
command-line. Am I right?
Then, I tried..
$ mipsisa3-elf-ld Âo output hello.o Âlc
It reported cannot find Âlc
1. I thought the linker would know the path where standard libraries are
stored & should automatically link-in when needed. But, I had to specify the
library explicitly (using Âlc) & also provide the library search path (using
ÂL#path#). Are both these (-l & -L) required (a must) when working with
standard C library functions? If yes, Please let me know how to specify the
ÂL with relative path (so that it will work, no matter where the tool-chain
was installed). If no ($ mipsisa3-elf-ld Âo output hello.o Â would produce
the output), then what went wrong in my setup?
2. libc (-lc) or libgcc (-lgcc)? Which one should I include? What is the
difference? Any document on them?
Please help me out on this.
MSN Toolbar provides one-click access to Hotmail from any Web page Â FREE
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss