when I compile this program in Netbeans, the program shows the text in the output- What is it I'm doing wrong that causes this error and how do I fix it?

This is the Code I'm using:

/* 
 * File:   main.cpp
 * Author: Oliver
 *
 * Created on May 4, 2014, 12:33 AM
 */
#include <iostream>
using namespace std;

int main(int argc, char** argv) {
    cout << "Hello World!";
    return 0;
}

This is the results...:

"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/sers/Oliver/Documents/NetBeansProjects/Learning'
"/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/learning.exe
make.exe[2]: Entering directory `/c/sers/Oliver/Documents/NetBeansProjects/Learning'
mkdir -p build/Debug/MinGW-Windows
make.exe[2]: mkdir: Command not found
make.exe[2]: *** [build/Debug/MinGW-Windows/main.o] Error 127
make.exe[2]: Leaving directory `/c/sers/Oliver/Documents/NetBeansProjects/Learning'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/sers/Oliver/Documents/NetBeansProjects/Learning'
make.exe": *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 1s)
有帮助吗?

解决方案

Look into your /C/MinGW/msys/1.0/bin/ for mkdir.exe .

if you found it there, you have not set your path environment variable to that folder.

C:\MinGW\msys\1.0\bin;C:\MinGW\bin;

So add it at the first place.

I apologize for the somewhat atypical picture. Binn currently working on a win2000 computer and can not switch.

enter image description here

其他提示

If this is not enough, you can set manually "make.exe" into the C/C++ NetBeans Properties > Make Command textbox.

It's located in the path said in the previous answer.

C:\MinGW\msys\1.0\bin\make.exe

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top