I am running windows 7 32bit.
I have netbeans installed using the cygwin compiler.
when i go to run the program i get an error.
do i have a problem with my compiler or code?
Thanks
1 2 3 4 5 6 7
|
#include <iostream>
using namespace std;
int main()
{
cout <<"I love my family";
return 0;
|
output error:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/Users/Familia/Documents/NetBeansProjects/test'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin_4.x-Windows/test.exe
make[2]: Entering directory `/cygdrive/c/Users/Familia/Documents/NetBeansProjects/test'
mkdir -p build/Debug/Cygwin_4.x-Windows
rm -f build/Debug/Cygwin_4.x-Windows/main.o.d
g++ -c -g -MMD -MP -MF build/Debug/Cygwin_4.x-Windows/main.o.d -o build/Debug/Cygwin_4.x-Windows/main.o main.cpp
mkdir -p build/Debug/Cygwin_4.x-Windows
rm -f build/Debug/Cygwin_4.x-Windows/testsource.o.d
g++ -c -g -MMD -MP -MF build/Debug/Cygwin_4.x-Windows/testsource.o.d -o build/Debug/Cygwin_4.x-Windows/testsource.o testsource.cpp
mkdir -p dist/Debug/Cygwin_4.x-Windows
g++ -o dist/Debug/Cygwin_4.x-Windows/test build/Debug/Cygwin_4.x-Windows/main.o build/Debug/Cygwin_4.x-Windows/testsource.o
build/Debug/Cygwin_4.x-Windows/testsource.o: In function `main':
/cygdrive/c/Users/Familia/Documents/NetBeansProjects/test/testsource.cpp:4: multiple definition of `main'
build/Debug/Cygwin_4.x-Windows/main.o:/cygdrive/c/Users/Familia/Documents/NetBeansProjects/test/main.cpp:15: first defined here
collect2: error: ld returned 1 exit status
nbproject/Makefile-Debug.mk:63: recipe for target `dist/Debug/Cygwin_4.x-Windows/test.exe' failed
make[2]: *** [dist/Debug/Cygwin_4.x-Windows/test.exe] Error 1
make[2]: Leaving directory `/cygdrive/c/Users/Familia/Documents/NetBeansProjects/test'
nbproject/Makefile-Debug.mk:60: recipe for target `.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/cygdrive/c/Users/Familia/Documents/NetBeansProjects/test'
nbproject/Makefile-impl.mk:39: recipe for target `.build-impl' failed
make: *** [.build-impl] Error 2
CONSTRUIR FAILED (valor de saída 2, tempo total: 5s)