-1
>gcc my.cpp
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VENKAT~1\AppData\Local\Temp\cccMqWsr.o:my.cpp:(.text+0x19): undefined reference to `std::cout'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VENKAT~1\AppData\Local\Temp\cccMqWsr.o:my.cpp:(.text+0x1e): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VENKAT~1\AppData\Local\Temp\cccMqWsr.o:my.cpp:(.text+0x35): undefined reference to `std::ios_base::Init::~Init()'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VENKAT~1\AppData\Local\Temp\cccMqWsr.o:my.cpp:(.text+0x56): undefined reference to `std::ios_base::Init::Init()'
collect2.exe: error: ld returned 1 exit status
MattDMo
  • 100,794
  • 21
  • 241
  • 231
Venkatesh
  • 11
  • 1

1 Answers1

1

is it just me, or your trying to use a C compiler to compile a C++ program try using g++ instead

Edwin Chew
  • 49
  • 1
  • 4