gcj-mingw32: it compiles, it runs, it segfaults
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Mon Dec 10 21:27:00 GMT 2001
Adam Megacz wrote:
>(gdb) run
>Starting program: /cygdrive/z/hello.exe
>>abnormal program termination
>>Program exited with code 03.
>(gdb) trace
>trace command requires an argument
>(gdb) bt
>No stack.
>
Hmm, its gonna be hard to figure out whats up without a stack trace.
>I don't know enough about the innards of gcj or the code it generates
>to make much sense of this... can anybody help me out here? My best
>guess is that something's up with jvgenmain... I noticed that after
>doing a "make install", no jvgenmain binary wound up in my install
>area. Does gcj have an internal copy of jvgenmain?
>
Yes, its in the compilers internal directory, not the installed bin
directory.
>I'm also running with no-threads... perhaps that has something to do
>with it?
>
More likely to work without threads than with currently on win32 I think ;-)
>I tried creating my own main with jvgenmain, but I get this when
>linking it:
>> /tmp/ccs1iKap.o: In function `main':
> /home/megacz/hello-main.cc(.text+0x3e): undefined reference to `_JvRunMain(java::lang::Class*, int, char const**)'
>
JvRunMain is extern "C" - looks like you declared it with C++ linkage.
regards
Bryce.
More information about the Java
mailing list