Uncaught exception with linux hosted cross GCC

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Uncaught exception with linux hosted cross GCC

Jörg Richter
I tried the following description to build a linux hosted mingw cross compiler:

http://www.mingw.org/MinGWiki/index.php/build%20a%20Win32%20x-compiler%20for%20Linux

It worked pretty well. And simple programs (without exceptions) run fine on Windows.

But when I tried this source:

///////////////////////////
int main( int, char** )
{
  try
  {
    throw 5;
  }
  catch( ... )
  {
  }
  return 0;
}
///////////////////////////

compiled it with:

$ i586-mingw32-g++ -o a.exe a.cc

And then run it on Windows. But it produces an access violation that 0x0 can't be read.
The same program built with MinGW/MSYS works fine.

Has anyone else experienced problems with a cross compiler and exceptions?


   Joerg


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users