www.digitalmars.com         C & C++   DMDScript  

c++ - Windows Error Code 0xc0000005

reply jay.a.carlson gmail.com writes:
I am trying to compile a simple test program using stlport 4.6.2 and dm 8.44c
and I get an error.

Windows XP gives the "test_simple_stl_program.exe has encountered a problem and
needs to close.  We are sorry for the inconvenience." error reporting message
box. Error Code is 0xc0000005 Searching the web it seems this is an access
violation code.

Here is the program:

#include<iostream>

int main(void) {
int number;
std::cout  << "\n\nHello World\n";
std::cin   >> number;                   //error 
std::cout  << "\n\nGoodbye\n";
return 0;
}

As soon as you press return after entering an integer ie 12 the program dies.

Is anyone else experiencing this problem?
Does anyone have a solution?

/r
Jay
Sep 01 2005
next sibling parent reply "Walter" <newshound digitalmars.com> writes:
<jay.a.carlson gmail.com> wrote in message
news:df8ith$2g2v$1 digitaldaemon.com...
 I am trying to compile a simple test program using stlport 4.6.2 and dm
8.44c
 and I get an error.
I suggest using stlport 4.5.3 which comes with DMC++ and works with it. You can download it from www.digitalmars.com/download/freecompiler.html
Sep 02 2005
parent jay.a.carlson gmail.com writes:
In article <df9vri$11lq$1 digitaldaemon.com>, Walter says...
<jay.a.carlson gmail.com> wrote in message
news:df8ith$2g2v$1 digitaldaemon.com...
 I am trying to compile a simple test program using stlport 4.6.2 and dm
8.44c
 and I get an error.
I suggest using stlport 4.5.3 which comes with DMC++ and works with it. You can download it from www.digitalmars.com/download/freecompiler.html
Thanks, Walter /r Jay
Sep 04 2005
prev sibling parent Scott Michel <scottm aero.org> writes:
jay.a.carlson gmail.com wrote:
 I am trying to compile a simple test program using stlport 4.6.2 and dm 8.44c
 and I get an error.
I dunno -- 4.6.2 "works for me". After all, I do maintain that DMC port at http://mordred.cs.ucla.edu/STLport_DMC/. I haven't sunk much time into STLport 5 yet, haven't really needed to do so.
 Windows XP gives the "test_simple_stl_program.exe has encountered a problem and
 needs to close.  We are sorry for the inconvenience." error reporting message
 box. Error Code is 0xc0000005 Searching the web it seems this is an access
 violation code.
What compiler flags are you using? Are you using the CD or the free compiler? Typically, this bug occurs when you mix the DLL STLport library with the static library. Also, you can only use the static STLport 4.6.2 library with DMC. Linking with the DLL version will cause you problems. STLport is __very__ sensitive to compiler flags -- it has lots of options. But with freedom comes responsibility... If you look at mordred's web page, you'll see exact compiler flags you need to use with the CD and the free versions of DMC. -scooter
Sep 08 2005