我有一个C++DLL,我已经用过好几次了。我使用Netbeans和MinGW。
我不确定这到底是什么时候开始的,我对代码做了一些小的更改,然后开始出现问题。基本上,我可以打开Netbeans,打开项目,执行Clean and Build,然后它通过,创建DLL。然而,如果我再次尝试,它会通过清理,但构建失败。以下是第二次清理和构建失败时的输出。
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .clean-conf
make.exe[1]: Entering directory `absolute path here...'
rm -f -r build/Release
rm -f dist/Release/MinGW-Windows/myfile.dll
make.exe[1]: Leaving directory `absolute path here...'
CLEAN SUCCESSFUL (total time: 2s)
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `absolute path here...'
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Release.mk dist/Release/MinGW-Windows/myfile.dll
make.exe[2]: Entering directory `absolute path here...'
mkdir -p build/Release/MinGW-Windows
make.exe[2]: mkdir: Command not found
make.exe[2]: *** [build/Release/MinGW-Windows/Main.o] Error 127
make.exe[2]: Leaving directory `absolute path here...'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `absolute path here...'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 2s)
除此之外,我的DLL一直在外部程序中执行,没有错误,现在根本不会执行。我忍不住认为这两个问题有关联。如果我运行更多次,我会收到不同的消息,这似乎非常不寻常。。。它不能执行rm命令吗?
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .clean-conf
make.exe[1]: Entering directory `absolute path here...'
rm -f -r build/Release
make.exe[1]: rm: Command not found
make.exe[1]: Leaving directory `absolute path here...'
make.exe[1]: *** [.clean-conf] Error 127
make.exe": *** [.clean-impl] Error 2
CLEAN FAILED (exit value 2, total time: 1s)
如果你需要更多信息,请告诉我,我在这里很迷路,所以任何帮助都很感激。谢谢
rm
和mkdir
通常是unix命令,必须将它们添加到PATH中才能在windows上工作。
尝试转到控制面板,搜索"environment"以打开环境面板,并编辑PATH以添加rm.exe和mkdir.exe的目录(我猜是C:msys1.0bin
)。
之后,您可能需要重新启动netbeans和任何打开的cmd shell。