无法构建NetBeans C/C ++项目 [英] Unable to build NetBeans C/C++ Project

查看:252
本文介绍了无法构建NetBeans C/C ++项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是无法在NetBeans中构建C/C ++项目. environment variable已正确设置.

I just can't build a C/C++ project in NetBeans. The environment variable is properly set.


错误:


Error :

"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE=            SUBPROJECTS= .build-conf
 make.exe[1]: Entering directory   `/c/Users/Rahul/Documents/NetBeansProjects/CppApplication_1'
 "/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk  dist/Debug/MinGW-Windows/cppapplication_1.exe
  make.exe[2]: Entering directory  `/c/Users/Rahul/Documents/NetBeansProjects/CppApplication_1'
  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/Users/Rahul/Documents/NetBeansProjects/CppApplication_1'
  make.exe[1]: *** [.build-conf] Error 2
  make.exe[1]: Leaving directory  `/c/Users/Rahul/Documents/NetBeansProjects/CppApplication_1'
  make.exe": *** [.build-impl] Error 2

  BUILD FAILED (exit value 2, total time: 2s)


代码:


Code :

#include <stdio.h>

int main(void) {
printf("hello");
return 0;
}


NetBeans-1:


NetBeans-1 :


NetBeans-2:


NetBeans-2 :

推荐答案

问题是来自msys的"make"会寻找msys mkdir,但找不到它,因为您不在msys环境中运行.

The problem is that the "make" from msys looks for the msys mkdir but can't find it because you are not running in an msys environment.

解决此问题的安全方法是从msys shell启动NetBeans.

The safe way to solve this is to launch NetBeans from the msys shell.

或者,您可以手动将目录创建为gcc/g ++/...,它本身也位于msys环境之外的路径上.

Alternatively you can manually create the directory as gcc/g++/... itself is also found on the path outside of an msys environment.

这篇关于无法构建NetBeans C/C ++项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆