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: 11s)

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



Joined: 10 Apr 2017
Posts: 1

PostPosted: Mon Apr 10, 2017 1:23 am    Post subject: BUILD FAILED (exit value 2, total time: 11s) Reply with quote

Anyone can help me? ty

Quote:
cd 'C:\Users\maatt\OneDrive\Documentos\NetBeansProjects\nasa'
C:\cygwin64\bin\make.exe -f Bues CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/nasa.exe
make[2]: Entering directory '/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa'
mkdir -p build/Debug/Cygwin-Windows
rm -f "build/Debug/Cygwin-Windows/main.o.d"
g++ -c -g -MMD -MP -MF "build/Debug/Cygwin-Windows/main.o.d" -o build/Debug/Cygwin-Windows/main.o main.cpp
mkdir -p dist/Debug/Cygwin-Windows
g++ -o dist/Debug/Cygwin-Windows/nasa build/Debug/Cygwin-Windows/main.o build/Debug/Cygwin-Windows/ndndnd.o build/Debug/Cygwin-Windows/pot.o
build/Debug/Cygwin-Windows/ndndnd.o: In function `main':
/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa/ndndnd.cpp:7: multiple definition of `main'
build/Debug/Cygwin-Windows/main.o:/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa/main.cpp:7: first defined here
build/Debug/Cygwin-Windows/pot.o: In function `main':
/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa/pot.cpp:21: multiple definition of `main'
build/Debug/Cygwin-Windows/main.o:/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa/main.cpp:7: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [nbproject/Makefile-Debug.mk:65: dist/Debug/Cygwin-Windows/nasa.exe] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa'
make[1]: *** [nbproject/Makefile-Debug.mk:61: .build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa'
make: *** [nbproject/Makefile-impl.mk:40: .build-impl] Error 2

BUILD FAILED (exit value 2, total time: 11s)
Back to top
Robert Hartzell
Posted via mailing list.





PostPosted: Mon Apr 10, 2017 7:36 pm    Post subject: BUILD FAILED (exit value 2, total time: 11s) Reply with quote

Quote:
On Apr 9, 2017, at 6:23 PM, eimattz <address-removed> wrote:

Anyone can help me? ty


Quote:
cd 'C:\Users\maatt\OneDrive\Documentos\NetBeansProjects\nasa'
C:\cygwin64\bin\make.exe -f Bues CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/nasa.exe
make[2]: Entering directory '/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa'
mkdir -p build/Debug/Cygwin-Windows
rm -f "build/Debug/Cygwin-Windows/main.o.d"
g++ -c -g -MMD -MP -MF "build/Debug/Cygwin-Windows/main.o.d" -o build/Debug/Cygwin-Windows/main.o main.cpp
mkdir -p dist/Debug/Cygwin-Windows
g++ -o dist/Debug/Cygwin-Windows/nasa build/Debug/Cygwin-Windows/main.o build/Debug/Cygwin-Windows/ndndnd.o build/Debug/Cygwin-Windows/pot.o
build/Debug/Cygwin-Windows/ndndnd.o: In function `main’:
/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa/ndndnd.cpp:7: multiple definition of `main’
build/Debug/Cygwin-Windows/main.o:/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa/main.cpp:7: first defined here
build/Debug/Cygwin-Windows/pot.o: In function `main':
/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa/pot.cpp:21: multiple definition of `main'
build/Debug/Cygwin-Windows/main.o:/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa/main.cpp:7: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [nbproject/Makefile-Debug.mk:65: dist/Debug/Cygwin-Windows/nasa.exe] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa'
make[1]: *** [nbproject/Makefile-Debug.mk:61: .build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/maatt/OneDrive/Documentos/NetBeansProjects/nasa'
make: *** [nbproject/Makefile-impl.mk:40: .build-impl] Error 2

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



Looks like you have the main() method defined in multiple files… You can never have more then one main() function in your project since its the entry point.

Hth, Robert=
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