Issue
I am totally new to C/C++ IDEs under mac os x, thus to netbeans. I downloaded the C/C++ dmg, under max os x 10.10.5.
I have built gcc-6.0.0
(dev version) from source and it works like a charm on the command line. I intend to use it with netbeans, so in netbeans preference, I created a new "tool collection" called "gcc-6.0.0" that I filled inspiring from the two default already available (called GNU and clang) after installation of netbeans. I've filled as follows :
- Base directory :
/usr/local/GNU/gcc-6.0.0
- C Compiler :
/usr/local/GNU/gcc-6.0.0/bin/gcc-6.0.0
- C++ Compiler :
/usr/local/GNU/gcc-6.0.0/bin/g++-6.0.0
- Fortran Compiler :
/usr/local/GNU/gcc-6.0.0/bin/gfortran-6.0.0
- Assembler :
/usr/bin/as
- Make command :
/usr/local/GNU/make-4.1/bin/make-4.1
- Debugger command : I left it empty
- QMake command : I left it empty
- CMake command :
/usr/local/lvm/cmake-3.3.2/bin/cmake
Note that my gcc commands (gcc, g++ and gfortran do have prefixes, it is not an error.) As I have built make and Cmake from source, I filled paths to their respective binaries also.
Note that in the add new tool collection windows, for "base directory" I have put : /usr/local/GNU/gcc-6.0.0
and was told (by a red message a the bottom of the new tool collection window) that "no compiler sets were found in the directory /usr/local/GNU/gcc-6.0.0
'... Same message if I put /usr/local/GNU/gcc-6.0.0/bin
instead...
Finally, I choose a welcome project template (for which I choose the newly created tool collection), and I build it, and have this console output :
cd '/Users/XXXXXXX/Documents/Welcome_1'
/usr/bin/make -f Makefile CONF=Debug
"/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU_1-MacOSX/tmp14
mkdir -p build/Debug/GNU_1-MacOSX
rm -f "build/Debug/GNU_1-MacOSX/welcome.o.d"
g++-6.0.0 -c -g -MMD -MP -MF "build/Debug/GNU_1-MacOSX/welcome.o.d" -o build/Debug/GNU_1-MacOSX/welcome.o welcome.cc
/bin/sh: g++-6.0.0: command not found
make[2]: *** [build/Debug/GNU_1-MacOSX/welcome.o] Error 127
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 221ms)
How come /bin/sh: g++-6.0.0: command not found
when I don't have any issued like this one on the command line, and when I gave paths to g++-6.0.0
in the new tool collection windows ?
How can I achieve what I intended to do, that is, using my gcc-6.0.0 gcc/g++ compiler with netbeans ?
Thx in advance !
Solution
Putting /usr/local/GNU/gcc-6.0.0/bin
for "base directory" instead of /usr/local/GNU/gcc-6.0.0
made my day, even if there still is the "no compiler sets were found in the directory" red message in the "new tool collection" window.
Answered By - Olorin