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: arm-elf-gcc problem!


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


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