[ECOS] Re: networking support for my eCos application

John Dallaway jld@ecoscentric.com
Fri Nov 9 09:22:00 GMT 2007


Chris

C B wrote:

> But, when I try to compile and link my own code I still get these undefined references when I try to link with the eCos libs I've built:
> 
>  >>> undefined reference to 'init_all_network_interfaces'
>  >>> undefined reference to 'eth0_up'
>  >>> undefined reference to 'eth0_bootp_data'
>  >>> undefined reference to 'inet_ntoa'
> 
> The command that gives those errors:
>      arm-elf-ld -L"C:\cygwin\opt\ecos\ecos-cvs\tmp\install\lib" -L"C:\cygwin\opt\ecos\ecos-cvs\tmp\net\common\current" -L"C:\cygwin\opt\ecos\gnutools\arm-elf\arm-elf\lib" -L"C:\cygwin\opt\ecos\gnutools\arm-elf\lib\gcc-lib\arm-elf\3.2.1" -Ttarget.ld  -o"Simple.exe"  ./simple.o
> 
> The ping_test calls init_all_network_interfaces() so I'm not sure why it's not found.

I suggest you look at the command line arguments which the eCos build
system used to successfully link the ping test. Try linking your own
code similarly at a command line prompt and, assuming the linker
succeeds, work backwards to see which switches make the difference.

For a start, you should be using "-nostdlib" in your link command and
you should need to explicitly reference only the lib directory in your
eCos install tree.

John Dallaway
eCosCentric Limited

-- 
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 mailing list