aarch64-linux-gnu-cpp
时间: 2023-09-17 18:06:58 浏览: 70
aarch64-linux-gnu-cpp is a preprocessor for C++ code that targets the AArch64 architecture. It is part of the GNU Compiler Collection (GCC) toolchain and is used to transform C++ source code into preprocessed code. This preprocessed code is then compiled by the AArch64 GNU Compiler to generate the final executable code. The aarch64-linux-gnu-cpp tool is typically used as a part of the build process for software targeting the AArch64 architecture, such as for ARM-based embedded systems or mobile devices.
相关问题
QT设置64位的交叉编译器project error : cannot run target compiler ' aarch64-linux-gnu-g++"
这个错误可能是由于Qt Creator没有正确配置交叉编译器引起的。你可以尝试以下步骤来解决这个问题:
1. 确保你安装了正确的交叉编译器。例如,在Ubuntu上,你可以使用以下命令安装64位的交叉编译器:
```
sudo apt-get install g++-aarch64-linux-gnu
```
2. 在Qt Creator中打开项目,然后在左侧的“项目”窗口中选择“Build & Run”。
3. 在“Build & Run”窗口中,选择“Compilers”选项卡,然后单击“Add”按钮。
4. 在“Add Compiler”对话框中,选择“GCC”作为编译器类型,然后单击“OK”。
5. 在“Compiler path”字段中输入你的交叉编译器的完整路径,例如:
```
/usr/bin/aarch64-linux-gnu-g++
```
6. 在“ABI”字段中选择“Generic Linux Device”。
7. 单击“Apply”按钮,然后关闭“Build & Run”窗口。
8. 重新编译你的项目,看看是否解决了问题。
如果你仍然遇到问题,你可以尝试在终端中手动编译你的代码,以便更好地了解错误的原因。你可以使用以下命令:
```
aarch64-linux-gnu-g++ -o myapp main.cpp
```
请将“myapp”替换为你的应用程序名称,将“main.cpp”替换为你的源代码文件。如果编译器仍然无法运行,请检查你的交叉编译器是否正确安装,并确保你的路径设置正确。
Log data follows: | DEBUG: Executing shell function do_configure | CMake Warning at CMakeLists.txt:7 (message): | Build type not set, falling back to Release mode. | | To specify build type use: | -DCMAKE_BUILD_TYPE=<mode> where <mode> is Debug or Release. | | | -- Building without demo. To enable demo build use: -DWITH_DEMO=True | -- The C compiler identification is GNU 7.3.0 | -- The CXX compiler identification is GNU 7.3.0 | -- Check for working C compiler: /home/wu/test_D9/D9_PTG1.5/build-d9/tmp/work/aarch64-niic-linux/antlr4/4.7.2-r0/recipe-sysroot-native/usr/bin/aarch64-niic-linux/aarch64-niic-linux-gcc | -- Check for working C compiler: /home/wu/test_D9/D9_PTG1.5/build-d9/tmp/work/aarch64-niic-linux/antlr4/4.7.2-r0/recipe-sysroot-native/usr/bin/aarch64-niic-linux/aarch64-niic-linux-gcc -- works | -- Detecting C compiler ABI info | -- Detecting C compiler ABI info - done | -- Detecting C compile features | -- Detecting C compile features - done | -- Check for working CXX compiler: /home/wu/test_D9/D9_PTG1.5/build-d9/tmp/work/aarch64-niic-linux/antlr4/4.7.2-r0/recipe-sysroot-native/usr/bin/aarch64-niic-linux/aarch64-niic-linux-g++ | -- Check for working CXX compiler: /home/wu/test_D9/D9_PTG1.5/build-d9/tmp/work/aarch64-niic-linux/antlr4/4.7.2-r0/recipe-sysroot-native/usr/bin/aarch64-niic-linux/aarch64-niic-linux-g++ -- works | -- Detecting CXX compiler ABI info | -- Detecting CXX compiler ABI info - done | -- Detecting CXX compile features | -- Detecting CXX compile features - done | -- Found PkgConfig: /home/wu/test_D9/D9_PTG1.5/build-d9/tmp/work/aarch64-niic-linux/antlr4/4.7.2-r0/recipe-sysroot-native/usr/bin/pkg-config (found version "0.29.2") | -- Checking for module 'uuid' | -- Found uuid, version 2.32.1 | -- Output libraries to /home/wu/test_D9/D9_PTG1.5/build-d9/tmp/work/aarch64-niic-linux/antlr4/4.7.2-r0/git/runtime/Cpp/dist | CMake Error at runtime/CMakeLists.txt:104 (install): | install TARGETS given no LIBRARY DESTINATION for shared library target | "antlr4_shared". | | | CMake Error at runtime/CMakeLists.txt:107 (install): | install TARGETS given no ARCHIVE DESTINATION for static library target | "antlr4_static". | | | -- Configuring incomplete, errors occurred! | See also "/home/wu/test_D9/D9_PTG1.5/build-d9/tmp/work/aarch64-niic-linux/antlr4/4.7.2-r0/build/CMakeFiles/CMakeOutput.log".这是报错的log,如何解决这个问题
根据提供的日志,可以看出在CMake配置过程中出现了两个错误。错误信息分别是:
1. CMake Error at runtime/CMakeLists.txt:104 (install): install TARGETS given no LIBRARY DESTINATION for shared library target "antlr4_shared".
2. CMake Error at runtime/CMakeLists.txt:107 (install): install TARGETS given no ARCHIVE DESTINATION for static library target "antlr4_static".
这些错误表明在配置期间,对于共享库目标 "antlr4_shared" 没有给出 LIBRARY DESTINATION,对于静态库目标 "antlr4_static" 没有给出 ARCHIVE DESTINATION。
要解决这个问题,你可以尝试以下方法:
1. 检查CMakeLists.txt文件:打开 "/home/wu/test_D9/D9_PTG1.5/build-d9/tmp/work/aarch64-niic-linux/antlr4/4.7.2-r0/git/runtime/CMakeLists.txt" 文件,并查找与 "antlr4_shared" 和 "antlr4_static" 相关的安装指令。
2. 添加正确的目标安装路径:在对应的安装指令中,确保给出了正确的目标安装路径。例如,对于共享库目标 "antlr4_shared",应该设置 LIBRARY DESTINATION,而对于静态库目标 "antlr4_static",应该设置 ARCHIVE DESTINATION。
3. 重新运行CMake配置:保存文件,并重新运行CMake配置命令以重新生成项目。可以尝试使用以下命令:`cmake /path/to/source`。
4. 编译和安装:如果配置成功,继续进行编译和安装。使用 `make` 命令编译项目,并使用 `make install` 命令安装项目。
如果问题仍然存在,可能需要进一步检查CMakeLists.txt文件中的其他配置,以及确保所有依赖项都正确安装。在解决问题时,可以查看 "/home/wu/test_D9/D9_PTG1.5/build-d9/tmp/work/aarch64-niic-linux/antlr4/4.7.2-r0/build/CMakeFiles/CMakeOutput.log" 文件,以获取更多有关配置错误的详细信息。
相关推荐
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![xz](https://img-home.csdnimg.cn/images/20210720083646.png)