【问题标题】:MinGW make: copy: command not foundMinGW make:复制:找不到命令
【发布时间】:2019-07-30 14:08:23
【问题描述】:

我正在尝试使用 MinGW 在 Windows 10 上编译 hp2xx。我的 makefile 是 make 目录中 dosdjgpp.mak 文件的直接副本。我在路径中有 c:\MinGW\bin 和 C:\MinGW\msys\1.0\bin。

make 操作在第一次复制时失败。它失败的 makefile 行是

pbuf.o: picbuf.o
    copy picbuf.o pbuf.o

错误是

copy picbuf.o pbuf.o
make: copy: Command not found
make: *** [pbuf.o] Error 127

在同一个命令提示符下我可以使用copy OK,为什么找不到呢?

【问题讨论】:

    标签: makefile mingw


    【解决方案1】:

    我相信mingw/bin包含linux风格的复制命令cp所以试试

    pbuf.o: picbuf.o
        cp picbuf.o pbuf.o
    
    

    如果尚未包含,您可能需要添加 windows 复制路径

    【讨论】:

    • 谢谢,已经完成了——我在makefile中用“cp”替换了“copy”,这个错误就消失了。现在我有新的错误要调查:)
    • 如果它是另一个 windows/linux 命令,您可能想学习 linux 变体 s.. 或 windows bin 路径:o
    猜你喜欢
    • 2021-02-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多