“ cc:命令未找到”,在Windows 10上运行libgcrypt的make时

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

全天!仅以此开头,我不是一位经验丰富的程序员,所以我可能不会使用正确的术语。

我正在Windows 10机器(内部版本号18363.628)上安装GnuPG 2.2.19。我已经安装了MinGW(根据mingw-get版本2013072300)以及npth 1.6和libgpg-error 1.37。我现在正在尝试安装libgcrypt 1.8.5。运行./autogen.sh --build-w32是可行的,但是运行make却失败,并显示以下输出(我使用msys.bat作为外壳程序):

$ make

make  all-recursive

make[1]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5'

Making all in compat

make[2]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/compat'

make[2]: Nothing to be done for 'all'.

make[2]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/compat'

Making all in mpi

make[2]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/mpi'

make[2]: Nothing to be done for 'all'.

make[2]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/mpi'

Making all in cipher

make[2]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/cipher'

cc -o gost-s-box ./gost-s-box.c

make[2]: cc: Command not found

make[2]: *** [gost-s-box] Error 127

make[2]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/cipher'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5'

make: *** [all] Error 2

[不幸的是,我第一次运行make后不小心关闭了外壳窗口,所以这是我第二次运行它的时间,因此是“无所事事”的事情。

我已经检查了Makefile中的libgcrypt;它包含以下内容:

  • CC = mingw32-gcc

  • CCAS = mingw32-gcc

  • CCASDEPMODE = depmode = gcc3

  • CCASFLAGS = -g -O2

  • CCDEPMODE = depmode = gcc3

  • CC_FOR_BUILD = cc

我已经检查了MinGW根文件夹,并且bin文件夹中同时存在gcc.exe和mingw32-gcc.exe。我还尝试将上述第一行更改为CC=gcc;没有变化。

任何人对问题出在哪里有什么建议?预先感谢。

gcc compilation windows-10 mingw32 libgcrypt
1个回答
0
投票

好,所以我设法自己解决了;经过一番研究,我发现在MinGW的bin中创建一个符号链接“ CC.exe”到“ mingw32-gcc.exe”就可以了。

© www.soinside.com 2019 - 2024. All rights reserved.