我正在尝试使用clang在Ubuntu上编译c程序并生成可以在Windows上运行的可执行文件。我已经读过clang documentation和How 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