在 ARM Zynq(裸机)上使用 Eigen C++ 库

Using Eigen C++ library on ARM Zynq ( baremetal )

本文关键字:Eigen C++ ARM Zynq 裸机      更新时间:2023-10-16

在未能交叉编译Zynq bremetal的GNU科学库(交叉编译GNU科学库for ARM Zynq(裸机((后,我尝试使用Eigen C++。

所以我下载它然后解压缩它并包含它的标题,如下所示

-I/home/wizard/Desktop/eigen

代码在我的PC上运行良好(这是x64 Ubuntu(,但是一旦我将编译器从gcc更改为arm-xilinx-eabi-gcc和g++到arm-xilinx-eabi-g++,代码就会给我以下错误:

invalid conversion from 'const int*' to 'const int32_t* {aka const long int*}' [-fpermissive]   test4       line 244, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'const int*' to 'const int32_t* {aka const long int*}' [-fpermissive]   test4       line 247, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'const int*' to 'const int32_t* {aka const long int*}' [-fpermissive]   test4       line 259, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'const int*' to 'const int32_t* {aka const long int*}' [-fpermissive]   test4       line 260, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'int*' to 'int32_t* {aka long int*}' [-fpermissive] test4       line 265, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'int*' to 'int32_t* {aka long int*}' [-fpermissive] test4       line 268, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'int*' to 'int32_t* {aka long int*}' [-fpermissive] test4       line 309, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem

我该怎么办?

终于能够解决问题了。有关解决方案 https://forum.kde.org/viewtopic.php?f=74&t=138964 请参阅"在 Zynq 裸机上编译 Eigen3"。