This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: arm-elf-gcc problem!
- From: "SOMARAJAN,SUNIL (HP-India,unix2)" <Sunil dot Somarajan at hp dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 17 Jun 2003 10:16:19 +0530
- Subject: Re: [ECOS] arm-elf-gcc problem!
- Organization: HP
- References: <3461BFE255CD084F97C125ED09209B1B165799@juno.therongroup.com>
- Reply-to: Sunil dot Somarajan at hp dot com
I assume that eCos has been already compiled to some location and
libtarget.a is present in some <dir>. You have to link hello.c to eCos.
arm-elf-gcc -Wall -g -I<location of eCos build dir/include>
-L<location of eCos build dir/lib> -Ttarget.ld
will give you a.out which has eCos linked with your application.
Sunil.
Steve Harlan wrote:
Hello,
I cannot compile a hello.c program with the pre-built arm-elf gnutools from ecoscentric.
I downloaded the eCos installation tool by using the following command at a bash prompt:
wget --passive-ftp ftp://sources.redhat.com/pub/ecos/ecos-install.tcl
I ran ecos-install.tcl from cygwin command line. selected 'arm-elf'
arm-elf gnutools 1.4.2
ecos 2.0
Installed to /opt/ecos, (d:/cygwin/home/sharlan/opt/ecos), my home directory.
When I compiled with:
"arm-elf-gcc -Wall -g -o hello hello.c".
I get an error like:
"<path>/ld: cannot find -lg"
"collect2: ld returned 1 exit status"
I also get a warning if I put a printf statement in the program.
"hello.c:21: warning: implicit declaration of function 'printf'"
Best Regards
Steve Harlan
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss