[ECOS] Target.ld

Meulendijks, J. Meulendijks@WT.TNO.NL
Fri Sep 17 09:02:00 GMT 2004


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

-----Original Message-----
From: Nick Garnett [mailto:nickg@ecoscentric.com]
Sent: donderdag 16 september 2004 11:07
To: Meulendijks, J.
Cc: 'ecos-discuss@sources.redhat.com'
Subject: Re: [ECOS] Target.ld


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

> When I use the following command:
> 
> powerpc-eabi-gcc -g -l/ecos-c/cygwin/EcosWork/kernel_install/include hello.c
> -l/ecos-c/cygwin/EcosWork/kernel_install/lib -Ttarget.ld -nostdlib

That commandline should probably read:

powerpc-eabi-gcc -g -I/ecos-c/cygwin/EcosWork/kernel_install/include hello.c
-L/ecos-c/cygwin/EcosWork/kernel_install/lib -Ttarget.ld -nostdlib

i.e. -I not -l for the include path, -L not -l for the library path.

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