为arm交叉编译opencv:C++:错误:无法识别的命令行选项'-mthumb';你的意思是“-mtbm”?

use*_*390 4 c++ opencv arm cross-compiling ubuntu-18.04

我正在尝试为 Tinker Board - 基于 ARM 的处理器 - Rockchip RK3288 交叉编译 opencv 4.0/3.4

我使用 Ubuntu 18.04 作为主机。

我几乎遵循了这里提到的所有内容。

但是当我尝试使用下面的 cmake 时:

mike@mike-laptop:~/opencv-3.4.5/build$ cmake -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/arm-gnueabi.toolchain.cmake ../ I am getting the below error:

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/c++ Build flags: -mthumb;;-fdata-sections;-Wa,--noexecstack;-fsigned-char;-Wno-psabi Id flags:

The output was: 1 c++: error: unrecognized command line option ‘-mthumb’; did you mean ‘-mtbm’?

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/c++ Build flags: -mthumb;;-fdata-sections;-Wa,--noexecstack;-fsigned-char;-Wno-psabi Id flags: -c

The output was: 1 c++: error: unrecognized command line option ‘-mthumb’; did you mean ‘-mtbm’?
Run Code Online (Sandbox Code Playgroud)

以及更多的消息

小智 5

我遇到了同样的问题。我试试

sudo apt-get install g++-arm-linux-gnueabi
sudo apt-get install g++-arm-linux-gnueabihf
Run Code Online (Sandbox Code Playgroud)

我解决了它。

我希望它会帮助你!