在 ARM Zynq(裸机)上使用 Eigen C++ 库
Using Eigen C++ library on ARM Zynq ( baremetal )
在为 Zynq baremetal (Cross compile GNU Scientific Library for ARM Zynq ( baremetal )) 交叉编译 GNU Scientific 库失败后,我尝试改用 Eigen C++。
所以我下载它然后解压缩并包含它的 header 如下所示
-I/home/wizard/Desktop/eigen
代码在我的电脑上运行良好(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"Compiling Eigen3 on Zynq baremetal"解决
在为 Zynq baremetal (Cross compile GNU Scientific Library for ARM Zynq ( baremetal )) 交叉编译 GNU Scientific 库失败后,我尝试改用 Eigen C++。
所以我下载它然后解压缩并包含它的 header 如下所示
-I/home/wizard/Desktop/eigen
代码在我的电脑上运行良好(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"Compiling Eigen3 on Zynq baremetal"解决