在linux中从debian编译armv7l的gcc

问题描述 投票:0回答:1

我在 Linux Debian (x86-64) 中使用 GCC 版本 10.2.1。

我写了这个C代码:

#include <stdio.h>

int main() {
  printf("Hello World!");
  return 0;
}

现在我的问题是如何为 armv7l 编译并运行这段代码?

目标系统是评估板

c linux armv7
1个回答
1
投票

您可以使用

arm-linux-gnueabihf-gcc hello.c -o hello
命令。在此之前,您应该在 Linux 系统中安装arm-linux-gnueabihf-gcc。

这是对我有用的完整示例

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.