uc freak | 2 Jul 2012 12:49
Picon

arm-linux-gnueabi/4.6.4/ld: cannot find -lc

Hello all,

I'm new to ELDK since a couple of days. I tried to build a small hello
world style application with static linking.

 I installed ELDK 5.2.1 on my PC (OS: Debian Wheezy, 32bit) like following:

> mount -o loop /home/arti/Downloads/eldk-5.2.1-armv4t.iso /media/cdrom1
> /media/cdrom1/install.sh armv4t
> source /opt/eldk-5.2.1/armv4t/environment-setup-armv4t-linux-gnueabi

Then I tried to generate a small c application (hello.c) :

#include <stdio.h>
#include <stdlib.h>

main (int ac, char **av)

{
                while (1) {
                                printf ("hello\n");
                                sleep (1)
                }
}

Compilation, static:

> arm-linux-gnueabi-gcc -static -o hello hello.c

Error message:
(Continue reading)

Wolfgang Denk | 2 Jul 2012 14:04
Picon
Picon
Favicon

Re: arm-linux-gnueabi/4.6.4/ld: cannot find -lc

Dear uc freak,

In message
<CAJUUqabVpg5X9f9ppE3aqEnot65kpARbyn1xJ6xf3Kq=8PUJ9w@...>
you wrote:
>
> Then I tried to generate a small c application (hello.c) :

Ok, but I bet this was not really the code you used.  Because it would
not compile:

> #include <stdio.h>
> #include <stdlib.h>
> 
> main (int ac, char **av)
> 
> {
>                 while (1) {
>                                 printf ("hello\n");
>                                 sleep (1)

There is a semicolon missing after this statement.

>                 }
> }
> 
> 
> Compilation, static:
> 
> > arm-linux-gnueabi-gcc -static -o hello hello.c
(Continue reading)


Gmane