anbu
anbu

Reputation: 71

ld: cannot find crt1.o: No such file or directory

I am cross compiling an applicantion for arm in yocto build using bitbake. It's compiling fine but linking fails with below error.

/gcc/arm-poky-linux-gnueabi/5.3.0/ld: cannot find crt1.o: No such file or directory

It also failed to link other files crti.o and crtbegin.o. I am not sure which dir needs to be added in LDFLAGS. Is it looking for arm toolchain lib dir or gcc lib dir?

Upvotes: 1

Views: 16287

Answers (1)

juansolsona
juansolsona

Reputation: 187

Just try a simple puts("Hello world") compiling with cc hello.c (no other options). If still have same issue most likely your toolchain is wrongly installed, else, check the linker options, may you are setting to not find standard libraries.

Hope it helps.

Upvotes: 2

Related Questions