GCJ with native structs

Stanley Brown stanley.brown@zimmer.com
Mon Dec 8 22:30:00 GMT 2003


> The "gcj" command doesn't link the C++ runtime libraries by default, 
> which you'll need to do a non-java "new". Try adding -lsupc++.
>> Regards
>> Bryce.
>
Yeah, I thought of this before but that led to problems also.
Heres what I have:
gcj --main=Test Test.java natTest.o -lsupc++
Gives this message:
c:/gcc-3.4/bin/../lib/gcc/i686-pc-mingw32/3.4/../../../../i686-pc-mingw32/lib/li
bgcj.a(win32.o)(.data+0x0):win32.cc: multiple definition of `_CRT_MT'
c:/gcc-3.4/bin/../lib/gcc/i686-pc-mingw32/3.4/../../../../i686-pc-mingw32/lib/li
bmingw32.a(crtst.o)(.data+0x0):crtst.c: first defined here
c:/gcc-3.4/bin/../lib/gcc/i686-pc-mingw32/3.4/../../../../i686-pc-mingw32/lib/li
bsupc++.a(vterminate.o)(.text+0x6d):vterminate.cc: undefined reference 
to `__cxa
_demangle'
It looks like libgcj has CRT_MT already defined which conflicts with 
mingw32 lib. Using libstdc++ instead of libsupc++ gets rid of the last 
error message listed above.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /