I've been trying to learn C++, but with a compiler that is refusing to work (or maybe I'm too n00bish to figure it out
) it's kinda hard.
I set the default compiler to Cygwin GCC, set all the toolchain executables (C compiler -> gcc-3.exe, C++ compiler -> g++-3.exe), and typed in some code in my current project. It's just a very simple program:
#include <iostream>
using namespace std;
int main()
{
int a = 5;
int b = 6;
a = a + 5;
int result = a + b;
cout << "The result is " << result;
return 0;
}
When I click Build and Run, I get a command prompt window with the following:
4 [main] ? 2488 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
Exception: STATUS_ACCESS_VIOLATION at eip=77AA47E5
eax=00000000 ebx=00000000 ecx=00000000 edx=7EFDD000 esi=00000000 edi=00400000
ebp=0028EEA4 esp=0028EE70 program=, pid 0, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
0028EEA4 77AA47E5 (00400000, 00000000, 00000000, 0028EEE8)
0028EEB8 77AA2C54 (00400000, 00000001, 0028EFC0, 6104F4A6)
0028EEE8 6109A582 (00400000, FFFFFFFE, 0028EEE4, 77AA317F)
0028EFA8 61004A78 (0028EFC0, FFFFFFFF, 0000EEEE, 0028F8B8)
0028FF58 6100594F (00000000, 00000000, 00000000, 00000000)
End of stack trace
Process returned -1073741819 (0xC0000005) execution time : 10.676 s
Press any key to continue.
And in the build log I get:
Checking for existence: C:\Users\Owner\Documents\C++Proj\C++ Experiments\bin\Release\C++ Experiments.exe
Executing: "C:\Program Files (x86)\CodeBlocks/cb_console_runner.exe" "C:\Users\Owner\Documents\C++Proj\C++ Experiments\bin\Release\C++ Experiments.exe" (in C:\Users\Owner\Documents\C++Proj\C++ Experiments\.)
Process terminated with status -1073741819 (0 minutes, 52 seconds)
Anyone know what's wrong here? Any way I can fix it?
(Also, I got the version with mingw included but I can't find a way to get it working with CodeBlocks)