This is my first experience with g++, so I might be missing something obvious. I installed MinGW (6.3.0) and am compiling following snippet on Windows. Compiling with no flags (that is required by the task) so just "g++ my_main.cpp"
int main(int argc, char** argv)
{
int s = 10;
int *a = new int[s];
delete[] a;
return 0;
}
It compiles, but upon running displays error window with close translation "Unable to find entry point in __cxa_throw_bad_array_new_length not found in DLL libstdc++-6.dll". When I replace new int[s] with new int[10] it compiles and runs with no problems. What is the catch?
EDIT: mingw.org seems to be an outdated project, installed MinGW-w64, all works as a charm.