簡體   English   中英

無法在Netbeans中編譯Hello World

[英]Can't Compile Hello World in Netbeans

當我在Netbeans中編譯該程序時,該程序在輸出中顯示文本-我做錯了什么導致該錯誤,並且該如何解決?

這是我正在使用的代碼:

/* 
 * 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;
}

這是結果...:

"/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)

/C/MinGW/msys/1.0/bin/查找mkdir.exe

如果在此找到它,則尚未將path environment variable設置為該文件夾。

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

因此,首先添加它。

對於有些不典型的圖片,我深表歉意。 Binn當前在win2000計算機上工作,無法切換。

在此處輸入圖片說明

如果這還不夠,您可以在“ C / C ++ NetBeans屬性”>“創建命令”文本框中手動設置“ make.exe”。

它位於上一個答案中所述的路徑中。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM