This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Target.ld


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.

Thanks.
-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch]
Sent: vrijdag 17 september 2004 11:37
To: Meulendijks, J.
Cc: 'ecos-discuss@sources.redhat.com'
Subject: Re: [ECOS] Target.ld


On Fri, Sep 17, 2004 at 11:02:25AM +0200, Meulendijks, J. wrote:
> When I use the following command:
> 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
> 
> I get the following output:
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o: In function
`cyg_user_start':
> 
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x20): undefined
referen
> ce to `printf'
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o: In function
`simple_program':
> 
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x100): undefined
refere
> nce to `printf'
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x110): undefined
refere
> nce to `rand'
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x160): undefined
refere
> nce to `printf'
> collect2: ld returned 1 exit status
> 
> Did I miss something?! The directory listed is not supposed to be used...

Its just a tempory directory gcc has placed the object file in. 

You are missing printf and rand. rand is part of CYGPKG_LIBC_STDLIB
and printf is in CYGPKG_LIBC_STDIO. Do you have these packages in your
configuration?

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]