[ECOS] Target.ld

Nick Garnett nickg@ecoscentric.com
Fri Sep 17 10:37:00 GMT 2004


"Meulendijks, J." <Meulendijks@WT.TNO.NL> writes:

> Okee thanks. Now it works fine!
> 
> I have one athor question. When eCos configtool builds a configuration it builds
> 3 directories. One of them is _install, in this directory there's a map called
> include and lib. In the lib map there's the file libtarget.a this contains the
> eCos you just configured. But if you compile something like this:
> powerpc-eabi-gcc -I/ecos-c/ecos-work/kernel_install/include twothreads.c
> -L/ecos-c/ecos-work/kernel_install/lib/ -Ttarget.ld -nostdlib -o twothreads.exe
> 
> you also need the include directory. Why is this? The library file contains all
> the functions needed, right?! Or am I confused here.

You are confused :-)

You need the include files to supply the definitions when you compile
twothreads.c. Otherwise you would get a lot of undefined symbols. Try
taking the -I option out and see what happens.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


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