我在C中制作了一个简单的Hello World程序,但我一直收到错误2。
我正在使用Netbeans 8.2和MinGW。
cd 'C:\Users\Diogo\Desktop\teste'
C:\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Debug
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/Diogo/Desktop/teste'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/teste.exe
make.exe[2]: Entering directory `/c/Users/Diogo/Desktop/teste'
mkdir -p dist/Debug/MinGW-Windows
gcc -o dist/Debug/MinGW-Windows/teste build/Debug/MinGW-Windows/main.o build/Debug/MinGW-Windows/newfile.o
build/Debug/MinGW-Windows/newfile.o: In function `main':
C:\Users\Diogo\Desktop\teste/newfile.c:2: multiple definition of `main'
build/Debug/MinGW-Windows/main.o:C:\Users\Diogo\Desktop\teste/main.c:20: first defined here
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/teste.exe] Error 1
make.exe[2]: Leaving directory `/c/Users/Diogo/Desktop/teste'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Diogo/Desktop/teste'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
如何解决错误?