NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

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

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
mitk



Joined: 10 Mar 2017
Posts: 1

PostPosted: Fri Mar 10, 2017 10:35 am    Post subject: BUILD FAILED (exit value 2, total time: 1s) Reply with quote

Hey guys, I am new to the programming world. I followed all the instructions to download netbeans and how to configure it using cygwin. Installed g++, gcc, gdb and make which is present in Tools - Options - C/C++ tab.

Also set the environmental variable to cygwin64/bin folder. I have been trying to run a sample 'welcome' project but constantly getting build failed error. I am posting below what is being displayed in the log:

cd 'C:\Users\mit\Documents\NetBeansProjects\Welcome_1'
C:\cygwin64\bin\make.exe -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/c/Users/mit/Documents/NetBeansProjects/Welcome_1'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/welcome_1.exe
make[2]: Entering directory '/cygdrive/c/Users/mit/Documents/NetBeansProjects/Welcome_1'
mkdir -p build/Debug/Cygwin-Windows
rm -f "build/Debug/Cygwin-Windows/welcome.o.d"
g++ -c -g -MMD -MP -MF "build/Debug/Cygwin-Windows/welcome.o.d" -o build/Debug/Cygwin-Windows/welcome.o welcome.cc
In file included from /usr/include/wchar.h:6:0,
from /usr/lib/gcc/x86_64-pc-cygwin/5.3.0/include/c++/cwchar:44,
from /usr/lib/gcc/x86_64-pc-cygwin/5.3.0/include/c++/bits/postypes.h:40,
from /usr/lib/gcc/x86_64-pc-cygwin/5.3.0/include/c++/iosfwd:40,
from /usr/lib/gcc/x86_64-pc-cygwin/5.3.0/include/c++/ios:38,
from /usr/lib/gcc/x86_64-pc-cygwin/5.3.0/include/c++/ostream:38,
from /usr/lib/gcc/x86_64-pc-cygwin/5.3.0/include/c++/iostream:39,
from welcome.cc:31:
/usr/include/sys/reent.h:14:20: fatal error: stddef.h: No such file or directory
compilation terminated.
make[2]: *** [nbproject/Makefile-Debug.mk:68: build/Debug/Cygwin-Windows/welcome.o] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/mit/Documents/NetBeansProjects/Welcome_1'
make[1]: *** [nbproject/Makefile-Debug.mk:59: .build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/mit/Documents/NetBeansProjects/Welcome_1'
make: *** [nbproject/Makefile-impl.mk:40: .build-impl] Error 2

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

Please let me know what is going wrong. I don't know what I missed.
Back to top
soldatov



Joined: 05 Nov 2009
Posts: 583

PostPosted: Fri Mar 10, 2017 9:13 pm    Post subject: Reply with quote

In my case 'stddef.h' is placed in 'gcc-core' package.
Code:
$ cygcheck.exe -f /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/include/stddef.h
gcc-core-5.4.0-1
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo