C++ 在Windows上交叉编译XZ-5.X.X

C++ 在Windows上交叉编译XZ-5.X.X,c++,gcc,cross-platform,xz,C++,Gcc,Cross Platform,Xz,我正试图在Windows上进行交叉编译。我已按照中的说明进行操作,但收到一个错误 Initializing Automake: checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk

我正试图在Windows上进行交叉编译。我已按照中的说明进行操作,但收到一个错误

Initializing Automake:
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/c/devel/xz-5.0.4':
configure: error: C compiler cannot create executables
See `config.log' for more details

有人能帮我找到问题吗

您的gcc有问题:configure无法通过编译void文件的简单测试

按照文档中的说明安装GCC,然后确保其二进制文件名为
GCC
(通常windows发行版更喜欢类似GCC-4.4的文件),如果没有,请使用符号链接。还要确保它在路径中

从命令行尝试命令
gcc test.c
,test.c是包含
intmain(void){return 0;}
——这是configure通常检查编译器的方式。如果它不工作,请使其工作,然后再次配置