How to cross compile c++ in imx8mmevk?

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

How to cross compile c++ in imx8mmevk?

895 Views
coilnpark
Contributor IV

Hi~

I am developing with imx8mmevk now.

I succeeded cross-compile C file with imx8mmvek.

But I can't succeed c++ file now.

Anybody help me?

I did as below.

source /opt/fsl-imx-wayland/4.14-sumo/environment-setup-aarch64-poky-linux

 

aarch64-poky-linux-gcc --sysroot=$SDKTARGETSYSROOT -march=armv8-a -mcpu=cortex-a53  main.c

aarch64-poky-linux-g++ --sysroot=$SDKTARGETSYSROOT -march=armv8-a -mcpu=cortex-a53  main.cpp

 To do cross-compile with C++, I added conf/local.conf and then I could see libstdc++.so.6 in /usr/lib as below.

But, the below error occurred now..

1.png

2.png

2 Replies

744 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Can you please try adding the "glibc" recipe to the IMAGE_INSTALL_append part in the local.conf and see if that solves the problem?

Best regards,

Diego.

744 Views
coilnpark
Contributor IV

Hi Diego~

Thank you for your reply.

I could success cross-compile C++ file with imx8mmvek after adding the below files.

But there was another problem.

Our application made for 32bit OS. We use pointer, array etc.

(Pointer 4byte in 32bit OS, Pointer 8 byte in 64bit)

So, if we want to use our application continuously without change source, could you let me know how should we do?

/usr/lib/libstdc++.so.6
/usr/lib/libstdc++.so.6.0.21
libgcc_s.so.1

Best regards,

Colin.

0 Kudos