gcc - 尝试在 github repo windows 10 上运行 make 时出错
问题描述
当我尝试编译这个程序时,我收到以下错误,我无法找到解决方法。我尝试make -DCC=gcc
在谷歌搜索问题时从另一篇文章中得到这个,但没有帮助,而是给了我另一个错误信息
PS \massdns> make
mkdir -p bin
cc -O3 -std=c11 -DHAVE_EPOLL -DHAVE_SYSINFO -Wall -fstack-protector-strong main.c -o bin/massdns
process_begin: CreateProcess(NULL, cc -O3 -std=c11 -DHAVE_EPOLL -DHAVE_SYSINFO -Wall -fstack-protector-strong main.c -o bin/massdns, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:5: all] Error 2
来自 make 的错误消息-DCC=gcc
PS massdns> make -DCC=gcc
C:\ProgramData\chocolatey\lib\make\tools\install\bin\make (pid = 4284)
C:\ProgramData\chocolatey\lib\make\tools\install\bin\make is suspending for 30 seconds...done sleep(30). Continuing.
make: *** C=gcc: No such file or directory. Stop.
一直在尝试解决这个问题,所以如果有人可以提供帮助,那将非常有用
回购说要安装这个,这样做
Clone the git repository and cd into the project root folder. Then run make to build from source. If you are not on Linux, run make nolinux. On Windows, the Cygwin packages gcc-core, git and make are required.
编辑:我确实尝试了 make nolinux 命令,只是忘记了我做过,因为我一直在尝试这样做一段时间,它是相同的输出,这是输出
PS massdns> make nolinux
mkdir -p bin
cc -O3 -std=c11 -Wall -fstack-protector-strong main.c -o bin/massdns
process_begin: CreateProcess(NULL, cc -O3 -std=c11 -Wall -fstack-protector-strong main.c -o bin/massdns, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:11: nolinux] Error 2
解决方案
问题解决了,当然是用户错误。
不熟悉如何通过 Cygwin 安装程序安装包、gcc-core、git,因为这是我在安装程序上没有见过的非常独特的交互。我还必须git clone repo_url
在 Cygwin 终端内进行操作,并且还必须在 Cygwin 终端内运行make
目录。
推荐阅读
- python - 我尝试在我的猜谜游戏中添加一个简单的重玩功能
- python - 我不知道如何让机器人 DM 成为我标记的用户
- ruby-on-rails - 连接 Rails 应用程序和无浏览器/chrome 容器
- python - 将参数传递给 sklearn 自定义转换器管道
- java - 忘记处理异常是逻辑/运行时错误还是不是错误
- python - 显示错误 ValueError 的选项卡:MDTabsLabel.color 的格式无效(得到 [])-Kivymd
- javascript - 选中复选框时如何动态调用函数?
- python - 删除特殊标点符号
- bash - 具有控制可能性的后台 Bash 脚本
- reactjs - 使用 React Hooks、Typescript 和 Axios 发布请求