在Ubuntu中使用clang进行交叉编译

时间:2020-08-04 13:43:09

标签: c++ clang

我正在尝试使用clang在Ubuntu上编译c程序并生成可以在Windows上运行的可执行文件。我已经读过clang documentationHow to cross-Compile clang/LLVM using Clang/LLVM,但我仍然不知道该怎么做。 例如,我编写了一个c程序test.c

#include <stdio.h>
int main(){
    printf("Hello, world\n");
    return 0;
}

如何使用clang生成可以在64位win10中运行的test.exe

我的环境位于64位 ubuntu18.04,clang 10,LLVM 10

0 个答案:

没有答案
相关问题