gpt4 book ai didi

windows - 如何为 YoloV3 Darknet(适用于 Windows)运行 "make"命令?

转载 作者:行者123 更新时间:2023-12-03 11:10:36 27 4
gpt4 key购买 nike

运行 ./make.exe 命令后(使用 GNUWin32),出现以下错误:

mkdir -p obj   
mkdir -p backup
A subdirectory or file -p already exists.
Error occurred while processing: -p. make: *** [backup] Error 1

重新运行命令后,出现不同的错误:

mkdir -p results
A subdirectory or file -p already exists.
Error occurred while processing: -p.
make: *** [results] Error 1

然后无论我重复 make 命令多少次,我都会得到同样的错误:

gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/gemm.c -o obj/gemm.o
process_begin: CreateProcess(NULL, gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/gemm.c -o obj/gemm.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [obj/gemm.o] Error 2

由于我是初学者,能否请您提供有关如何解决该问题的详细说明?

最佳答案

这些问题:

mkdir -p obj   
mkdir -p backup
A subdirectory or file -p already exists.
Error occurred while processing: -p. make: *** [backup] Error 1

是因为你要求 Make 在 Windows 上执行,为在 Linux 或其他一些类 Unix 操作系统上运行而编写的 makefile。

在类 Unix 操作系统中,命令:

mkdir -p obj

意思是:创建一个名为 obj 的目录如果它已经存在则没有错误。在Windows 意味着:创建一个名为 -p 的目录,然后是一个名为 obj 的目录。

因此,当 mkdir -p obj 创建目录 -pobj 时,命令:

mkdir -p backup

失败是因为:

A subdirectory or file -p already exists.

Unix/Linux makefile 无意创建名为 -p 的目录,但在 Windows 上这就是它的作用。

您尝试修复此特定错误毫无意义。这只是尝试执行 Unix/Linux 会导致无限多的错误中的第一个Windows 上的生成文件。您需要一个编写用于运行的 makefileWindows,或者自己编写一个,或者找到一种在不使用 Make 的 Windows 上构建软件的方法。

这个问题:

gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/gemm.c -o obj/gemm.o
process_begin: CreateProcess(NULL, gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/gemm.c -o obj/gemm.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [obj/gemm.o] Error 2

是你没有安装GCC引起的C编译器gcc 在您的计算机上,或者如果您有,它所在的目录不在您的 PATH 中。所以 Make 找不到它执行编译和链接软件的基本业务。

这里是 a popular Windows port of GCC

关于windows - 如何为 YoloV3 Darknet(适用于 Windows)运行 "make"命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54749046/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com