C Building C++ Projects in Netbeans 8

Hello everyone,

I'm already using Netbeans for some Java EE work, and I kind of dig it; I'd like to use it as my C++ IDE over Clang as well, but I get this funky error message whenever I try to build any C++ project:
Code:
make: "nbproject/nbproject/Makefile-variables.mk" line 30: warning: Couldn't read shell's output for "test -f nbproject/private/Makefile-variables.mk ||  (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)"
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: "nbproject/nbproject/Makefile-variables.mk" line 30: warning: Couldn't read shell's output for "test -f nbproject/private/Makefile-variables.mk ||  (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)"
make[1]: "/usr/home/foo/NetBeansProjects/CppApplication_1/.dep.inc" line 3: Missing dependency operator
make[1]: "/usr/home/foo/NetBeansProjects/CppApplication_1/.dep.inc" line 4: Could not find
make[1]: "/usr/home/foo/NetBeansProjects/CppApplication_1/.dep.inc" line 5: Need an operator
make[1]: Fatal errors encountered -- cannot continue
make[1]: stopped in /usr/home/foo/NetBeansProjects/CppApplication_1
It looks like .dep.inc is a file that gets auto-generated before every build. Admittingly, I'm new to Netbeans, but I can't wrap my head around it. Any ideas?
 
Code:
make[1]: "/usr/home/foo/NetBeansProjects/CppApplication_1/.dep.inc" line 3: Missing dependency operator
make[1]: "/usr/home/foo/NetBeansProjects/CppApplication_1/.dep.inc" line 4: Could not find
make[1]: "/usr/home/foo/NetBeansProjects/CppApplication_1/.dep.inc" line 5: Need an operator
make[1]: Fatal errors encountered -- cannot continue

I don't use Netbeans, but these errors seem to indicate that Netbeans generates Makefiles that are incompatible with FreeBSD's make. You might need to use gmake instead of make for this. Is there maybe a preference in Netbeans for setting the make command it uses?
 
Go to Tools > Options > C/C++

Under "Tool Collection" select CLang

Change the "Make Command": /usr/local/bin/gmake

Ofcourse you might have to install gmake before it works.
 
Back
Top