Добрый вечер. Netbeans 8.2, компилятор MinGW.
Компилирую код:
#include <iostream>
using namespace std;
int main() {
int a;
cout << "input a" << endl;
cin >> a;
cout << "Answer a = " << a;
}
Выдает ошибку:
cd 'C:\Users\Zem\Documents\netbeans_project\cpp_love'
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/Zem/Documents/netbeans_project/cpp_love'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cpp_love.exe
make.exe[2]: Entering directory `/c/Users/Zem/Documents/netbeans_project/cpp_love'
mkdir -p build/Debug/MinGW-Windows
rm -f "build/Debug/MinGW-Windows/test.o.d"
g++ -c -g -MMD -MP -MF "build/Debug/MinGW-Windows/test.o.d" -o build/Debug/MinGW-Windows/test.o test.cpp
mkdir -p dist/Debug/MinGW-Windows
g++ -o dist/Debug/MinGW-Windows/cpp_love build/Debug/MinGW-Windows/_ext/946084c6/hello.o build/Debug/MinGW-Windows/_ext/946084c6/int_float.o build/Debug/MinGW-Windows/test.o
build/Debug/MinGW-Windows/_ext/946084c6/int_float.o: In function `main':
C:\Users\Zem\Documents\netbeans_project\cpp_love/../../../Dropbox/cpp_love/jni/int_float.cpp:5: multiple definition of `main'
build/Debug/MinGW-Windows/_ext/946084c6/hello.o:C:\Users\Zem\Documents\netbeans_project\cpp_love/../../../Dropbox/cpp_love/jni/hello.cpp:6: first defined here
build/Debug/MinGW-Windows/test.o: In function `main':
C:\Users\Zem\Documents\netbeans_project\cpp_love/test.cpp:3: multiple definition of `main'
build/Debug/MinGW-Windows/_ext/946084c6/hello.o:C:\Users\Zem\Documents\netbeans_project\cpp_love/../../../Dropbox/cpp_love/jni/hello.cpp:6: first defined here
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/cpp_love.exe] Error 1
make.exe[2]: Leaving directory `/c/Users/Zem/Documents/netbeans_project/cpp_love'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Zem/Documents/netbeans_project/cpp_love'
make.exe": *** [.build-impl] Error 2
СОБРАТЬ FAILED (значение выхода 2,, общее время: 2s)
Что не так? Как быть?