为什么我不能在计算机上编译简单的C ++程序?

时间:2019-10-21 11:22:02

标签: c++ compiler-errors mingw codelite

图片链接: enter image description here

当我单击编译时,出现此错误= mingw32-make.exe:*** [全部]错误2

我正在使用mingw编译器

#include<iostream>
using namespace std;
int main ()
{
  cout << "Hello Testing";
  return 0;     
}

C:\Windows\system32\cmd.exe /C C:/MinGW/bin/mingw32-make.exe -j8 SHELL=cmd.exe -e -f  Makefile
"----------Building project:[ Learning - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'D:/C++/C++/Learning'
C:/MinGW/bin/g++.exe -o ./Debug/Learning @"Learning.txt" -L.
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: ./Debug/main.cpp.o: in function `main':
D:/C++/C++/Learning/main.cpp:4: multiple definition of `main'; ./Debug/basic_calculator.cpp.o:D:/C++/C++/Learning/basic_calculator.cpp:4: first defined here
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: ./Debug/Welcome.cpp.o: in function `main':
D:/C++/C++/Learning/Welcome.cpp:5: multiple definition of `main'; ./Debug/basic_calculator.cpp.o:D:/C++/C++/Learning/basic_calculator.cpp:4: first defined here
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/Learning] Error 1
Learning.mk:78: recipe for target 'Debug/Learning' failed
mingw32-make.exe[1]: Leaving directory 'D:/C++/C++/Learning'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
====1 errors, 0 warnings====

0 个答案:

没有答案