Hi,
I downloaded mingw-w64-gcc-4.8.0-stable-r7 and wrote a simple program before moving on to unique pointers (C++11).
#include<iostream>
using namespace std;
int main()
{
cout<<"hello"<<endl;
return 0;
}
The code compiles without errors, but I get no output on running it.
Process returned 1970924701 (0x7579EC9D) execution time : 0.002 s
Press any key to continue.
I'm running it on 32 bit Vista.
When I compile with option "-m32", I get the following errors while compiling.
C:\Users\Shekhu.ROMMELSMACHINE\Documents\Code Blocks Programs\auto.o:auto.cpp|| undefined reference to `___main'|
C:\Users\Shekhu.ROMMELSMACHINE\Documents\Code Blocks Programs\auto.o:auto.cpp|| undefined reference to `__ZSt4cout'|
C:\Users\Shekhu.ROMMELSMACHINE\Documents\Code Blocks Programs\auto.o:auto.cpp|| undefined reference to `__ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc'|
C:\Users\Shekhu.ROMMELSMACHINE\Documents\Code Blocks Programs\auto.o:auto.cpp|| undefined reference to `__ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_'|
C:\Users\Shekhu.ROMMELSMACHINE\Documents\Code Blocks Programs\auto.o:auto.cpp|| undefined reference to `__ZNSolsEPFRSoS_E'|
C:\Users\Shekhu.ROMMELSMACHINE\Documents\Code Blocks Programs\auto.o:auto.cpp|| undefined reference to `__ZNSt8ios_base4InitD1Ev'|
C:\Users\Shekhu.ROMMELSMACHINE\Documents\Code Blocks Programs\auto.o:auto.cpp|| undefined reference to `__ZNSt8ios_base4InitC1Ev'|
C:\Users\Shekhu.ROMMELSMACHINE\Documents\Code Blocks Programs\auto.o:auto.cpp|| undefined reference to `_atexit'|
||=== Build finished: 8 errors, 0 warnings (0 minutes, 0 seconds) ===|
Can anybody please help? And I have the option -std=C++11 set.