Re: [arm-gnu] GCC library linker problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] GCC library linker problems



On Sat, Feb 24, 2007 at 02:00:31AM -0500, Eric Fattah wrote:
> I have spent more than three full days trying to debug a library linker problem.
>   
>   My project has custom start up code, and I must use -nodefaultlibs  -nostartfiles, in order to prevent conflicts with automatic startup  code.  
>   
>   Thus, I need to manually add libraries.  I am working within Eclipse and don't have the option of a custom makefile.
>   
>   If I try to use functions such as cos(x) or sprintf(), I get a huge  list of unresolved references.  I have added every library I am  aware of, without success.  Below is a dump.
>   

The missing functions come from either libc or libgcc.  Libraries are
searched in the order specified, so ordering is important.  Normally gcc
adds the correct options, but you disabled that with  -nodefaultlibs.
Libraries may need to be listed multiple times to resolve circular
dependencies.

You can add -v to the commandline when linking a normal application
to see the options that uses.

Paul