我不能得到Netbeans C ++工作,我做错了什么? [英] I can't get Netbeans C++ to work, what am I doing wrong?
问题描述
我最近下载了Netbeans,我不能让C ++组件正常工作,当我尝试编译示例程序时,我得到这个错误:
/ c / Users / * / Documents / NetBeansProjects / Welcome_1 /C:/ Program Files(x86)/MinGW/msys/1.0/bin/make.exe-f nbproject / Makefile-Debug.mk QMAKE = SUBPROJECTS = .build-conf
/ bin / sh:-c:line 0:意外标记附近的语法错误`('
/ bin / sh:-c:line 0`/ c / Users / * / Documents / NetBeansProjects / Welcome_1 /C:/ Program Files(x86)/MinGW/msys/1.0/bin/make.exe-f nbproject / Makefile-Debug.mk QMAKE = SUBPROJECTS = .build-conf'
make.exe:*** [.build-impl]错误2
BUILD FAILED值2,总时间:3s)
我使用以下构建工具:
家庭:MinGW
基本目录:C:\Program Files(x86)\MinGW\bin
C编译器:C:\Program Files(x86)\MinGW\bin\gcc.exe
C ++编译器:C:\Program Files(x86)\MinGW\bin\g ++。exe
Fortran编译器:C:\Program Files(x86) \\ MinGW \bin\gfortran.exe
汇编程序:C:\Program Files(x86)\MinGW\bin\as.exe
Make命令:C:\Program Files(x86)\MinGW\bin\\\\\\\\ make.exe
或者,我使用过C:\Program文件(x86)\Msys\1.0\bin\make.exe
调试器命令:C:\Program Files(x86)\MinGW\bin\gdb.exe
我在NetBeans 7.3新安装在Windows 8上有相同的问题,使用Nuwen的MinGWdistro和MSYS。
发生的奇怪的事情是:
< blockquote>
/ c / Users / * / Documents / NetBeansProjects / Welcome_1 /C:/ Program Files
(x86)/MinGW/msys/1.0/bin/make.exe -f nbproject / Makefile-Debug.mk
QMAKE = SUBPROJECTS = .build-conf
的当前项目和可执行的路径粘合在一起,所以我们得到一个错误,显然。
我首先做的是比较我的可执行文件的版本。我有两个可执行文件:
-
c:\MSYS\bin\make.exe
- 3.81
GNU Make 3.81版权所有(C)2006 Free Software Foundation,是自由软件;请参阅复制条件的来源。有NO
保修;
此程式专为i686-pc-msys而设计
-
c:\MinGW\bin\make.exe
- 3.82
GNU Make 3.82专为i686-pc-mingw32开发版权所有(C)2010免费
软件基金会许可GPLv3 +:GNU GPL版本3或更高版本
http://gnu.org/licenses/gpl.html 这是免费软件:你可以免费
来改变和重新分配它。没有任何保证,法律允许的范围是
。
我把NB指向MSYS一个,但是当我把它改成MinGW的时候,所有的魔法都开始工作了。
I recently downloaded Netbeans and I can't get the C++ component to work properly, when I attempt to compile on of the example programs I get this error:
"/c/Users/*/Documents/NetBeansProjects/Welcome_1/"C:/Program Files (x86)/MinGW/msys/1.0/bin/make.exe"" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0 `"/c/Users/*/Documents/NetBeansProjects/Welcome_1/"C:/Program Files (x86)/MinGW/msys/1.0/bin/make.exe"" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 3s)
I am using the following build tools:
Family: MinGW
Base Directory: C:\Program Files (x86)\MinGW\bin
C Compiler: C:\Program Files (x86)\MinGW\bin\gcc.exe
C++ Compiler: C:\Program Files (x86)\MinGW\bin\g++.exe
Fortran Compiler: C:\Program Files (x86)\MinGW\bin\gfortran.exe
Assembler: C:\Program Files (x86)\MinGW\bin\as.exe
Make Command: C:\Program Files (x86)\MinGW\bin\msys\1.0\bin\make.exe
Alternately, I've used C:\Program Files (x86)\Msys\1.0\bin\make.exe
Debugger Command: C:\Program Files (x86)\MinGW\bin\gdb.exe
I have had quite the same problem with NetBeans 7.3 fresh install on Windows 8, using Nuwen's MinGW "distro" and MSYS. I used MSYS make, which by the way was not automatically detected.
The strange thing that happens is this:
"/c/Users/*/Documents/NetBeansProjects/Welcome_1/"C:/Program Files (x86)/MinGW/msys/1.0/bin/make.exe"" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
As we can see, path of current project and path to make executable are glued together, and so we get an error, obviously.
What I did first is to compare my make executables' versions. I had two make executables:
c:\MSYS\bin\make.exe
- 3.81GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This program built for i686-pc-msys
c:\MinGW\bin\make.exe
- 3.82GNU Make 3.82 Built for i686-pc-mingw32 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
I was pointing NB to the MSYS one, but when I changed that to the MinGW one - it all magically started to work fine.
这篇关于我不能得到Netbeans C ++工作,我做错了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!