我下载了 NetBeans 并尝试运行一个基本程序,但弹出了这个错误,我不知道这是什么意思,也不知道为什么我不能运行该程序,如果它有帮助的话,这是我的代码:
#include <stdio.h>
int main() {
int x = 3, y = 3;
printf("X=%d, Y=%d\n", x, y);
printf("Input new values for both variables:\n");
printf("X:");
scanf("%d", &x);
printf("Y:");
scanf("%d", &y);
printf("X=%d, Y=%d\n", x, y);
return 0;
}
这是这个东西:
cd 'C:\Users\NTC\Documents\NetBeansProjects\Abrahim'
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/NTC/Documents/NetBeansProjects/Abrahim'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/abrahim.exe
make.exe[2]: Entering directory `/c/Users/NTC/Documents/NetBeansProjects/Abrahim'
mkdir -p dist/Debug/MinGW-Windows
gcc -o dist/Debug/MinGW-Windows/abrahim build/Debug/MinGW-Windows/task1.o build/Debug/MinGW-Windows/task2.o
build/Debug/MinGW-Windows/task2.o: In function `main':
C:\Users\NTC\Documents\NetBeansProjects\Abrahim/task2.c:2: multiple definition of `main'
build/Debug/MinGW-Windows/task1.o:C:\Users\NTC\Documents\NetBeansProjects\Abrahim/task1.c:2: first defined here
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/abrahim.exe] Error 1
make.exe[2]: Leaving directory `/c/Users/NTC/Documents/NetBeansProjects/Abrahim'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/NTC/Documents/NetBeansProjects/Abrahim'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)