c++代码在NetBeans 8.0中无法编译(msys mkdir可能存在的问题)
C++ Code Not Compiling in NetBeans 8.0 (possible issue with msys mkdir)
我一直在搜索堆栈和谷歌解决我的问题,但我还没有找到任何工作。我试图编译一些NetBeans附带的示例代码来测试它,但我一无所获。我一直得到以下错误
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/Damian/Documents/NetBeansProjects/InputOutput_1'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/inputoutput_1.exe
make.exe[2]: Entering directory `/c/Users/Damian/Documents/NetBeansProjects/InputOutput_1'
mkdir -p build/Debug/MinGW-Windows/src
make.exe[2]: mkdir: Command not found
make.exe[2]: *** [build/Debug/MinGW-Windows/src/io.o] Error 127
make.exe[2]: Leaving directory `/c/Users/Damian/Documents/NetBeansProjects/InputOutput_1'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Damian/Documents/NetBeansProjects/InputOutput_1'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 2s)
我的NetBeans设置如下:
基本目录: C: MinGW bin
C编译器:C: MinGW bin gcc.exe
c++编译器:C: MinGW bin g++ . exe
Fortran编译器:C: MinGW bin gfortran.exe
汇编:C: MinGW bin as.exe
命令:C:MinGWmsys1.0binmake.exe
调试命令:C: MinGW bin gdb.exe
我设置了相应的PATH环境变量:
路径> C: MinGW msys 1.0 bin; C: MinGW bin;
我还确保mkdir.exe实际上是在"C:MinGWmsys1.0bin"。
>mkdir test123
##The result is folder "test123" being created in whatever
##directory I was running the command prompt from
我注意到,当mkdir执行时,-p标志被应用,所以我在命令提示符中尝试了一下,它返回了以下错误:
C:UsersDamian>mkdir -P A/A/A/A
The syntax of the command is incorrect.
有人遇到类似的问题吗?如果相关的话,我使用了http://sourceforge.net/projects/mingw/files/Installer/上的"mingw-get-setup.exe"。我想不出其他的东西,我不知道为什么-p标志不起作用。我查了一下它的功能,它是用来创建嵌套文件夹的。无论使用哪种方式,都不能使用mkdir创建带或不带-p标志的嵌套文件夹。您只会得到错误提示"命令的语法不正确"。
不确定它是否有用,但我运行的是Windows 8.1(64位)。我也尝试过使用mingw32的mingw-w64分支(即。 http://sourceforge.net/projects/mingw-w64/),但我得到相同的错误
设置正确。如果您在安装MINGW之前/期间在netbeans上设置了设置,就会发生这种情况。重新启动netbeans
- mkdir 从命令行工作,但在使用 NFS 时C++失败
- 为什么 mkdir() 后跟 ofstream::operator<< 失败并被拒绝权限?
- /TMP 中的 MKDIR 不起作用:"Permission Denied"
- mkdir()不与绝对filepath一起使用
- 尝试模拟Linux shell.使用模拟MKDIR的问题
- MKDIR 在 C++ 系统调用中失败 - int 类型的参数与 const char* 类型的参数不兼容
- 在MSYS上为GDBSERVER下的程序提供论点
- 如何阻止NetBeans使用Cygwin Bin目录并使其使用MSYS
- 找不到C++netbeans mkdir中的错误
- 使用MSYS:X11构建GLEW未找到
- 使用[msys]bash删除所有名称与模式匹配的文件,而不考虑文件名字母大小写
- 正在msys(MinGW)中链接dxguid.obj
- MSYS SDL-2.0 "C compiler cannot create executables"
- 未找到 MinGW msys 软件包:如何继续的一般建议
- C++:使用 g++ 和 -m32 选项构建的 c++ 库在 Msys 下构建 wxWidgets 项目时出现 ld 不
- msys 和 tdm-gcc:配置错误 - 无法运行 C 编译的程序
- 通过 CreateProcessW 使用"mkdir"创建的目录名称中的垃圾?
- mkdir c++ function
- mkdir,带符号的路径名
- c++代码在NetBeans 8.0中无法编译(msys mkdir可能存在的问题)