GCJ 3.4 + MingW = Trouble
Ranjit Mathew
rmathew4lists@hotmail.com
Tue May 6 13:56:00 GMT 2003
> >> I am only attempting the cross build now. When I build the cross
> >> compiler and use it to generate a Win32 executable for a simple
> >> HelloWorld program, the generated program crashes with a segmentation
> >> violation. At first blush, this doesn't appear to be the same issue
> >
> >Are you talking of a GCJ compiled "HelloWorld" (in Java) or one
> >written in C/C++?
>> A Java one.
And a C/C++ one succeeds? This is cause for alarm
(and investigation)!
> Let me know if you want me to put the sources somewhere
No way - that'll then be the end of *that* excuse for me... ;-)
(Just kidding!)
> or if you have any other debugging tips.
I have found it useful to install "Dr MinGW":
http://jrfonseca.dyndns.org/projects/gnu-win32/software/drmingw/index.html
as a JIT (Just-in-Time) Windows debugger for crashing executables
developed using MinGW (it's not a full-fledged debugger like
GDB). It's usually able to point out the faulting line.
BTW, why can't you compile stuff with a combo option like "-g -O2"?
I do not think "-g" and "-O2" are mutually exclusive - or that's
what this page would have me believe:
http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html
Ranjit.
More information about the Java
mailing list