【发布时间】:2020-02-03 00:37:53
【问题描述】:
当我尝试编译这个程序时,我得到了以下错误,我不知道如何解决它..
我尝试了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.
一直在努力解决这个问题,如果有人可以提供帮助,那将是非常重要的
Repo 说要安装这个,做这个
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
【问题讨论】:
-
你试过
make nolinux这个命令了吗? -
@rfmodulator 是的,对不起,我忘记了,我用帖子中的输出更新了它。
-
您可以尝试
make V=1 nolinux以获得详细输出。还有其他参数可以传递给make,它们也会显示不同级别的详细程度。 ...这里的想法是找出它找不到哪个文件。 -
@rfmodulator 感谢您提供帮助。我想当然是我的错。再次感谢您的帮助。