How to resolve cross compilation error?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to resolve cross compilation error?

2,441 Views
naveennvn
Contributor III

Hi all,

I'm using ls2085aqds board with Layerscape2-SDK-20150828-yocto SDK,

While cross compiling using the toolchain(aarch64-fsl-linux-gcc) a simple helloworld.c file itself throws error like the following,

==============

[Naveen@NvN aarch64-fsl-linux]$ ./aarch64-fsl-linux-gcc helloworld.c

helloworld.c:1:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

                   ^

compilation terminated.

[Naveen@NvN aarch64-fsl-linux]$

===============

Note : Toolchain path=Layerscape2-SDK-20150828-yocto/build_ls2085aqds_release/tmp/sysroots/x86_64-linux/usr/bin/aarch64-fsl-linux/

How to fix this issue?

Thanks Regards,

-Naveen

Labels (1)
0 Kudos
1 Reply

1,136 Views
bpe
NXP Employee
NXP Employee

Your compiler does not know where to get standard headers.

Follow these instructions:

https://freescale.sdlproducts.com/LiveContent/content/en-US/QorIQ_SDK_1.9/GUID-16DBC8E2-9A18-4867-9B...

Do not forget to run  'environment-setup-<core>' script.More details here:Directory Options - Using the GNU Compiler Collection (GCC)


Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos