Posted By:
rich_paul
Posted On:
Tuesday, March 19, 2002 12:11 PM
--- CUT HERE --- #include #include "HelloWorld.h" #include "stdio.h" #include JNIEXPORT void JNICALL Java_HelloWorld_sayHello(JNIEnv *env, jobject obj) { printf("Hello, world! "); try { throw 0; } catch ( int i ) { printf("Caught: %d "); }; printf("~Hello, world! "); return; }; --- CUT HERE --- This is, as has been often said, due to the differant c++ toolchain and shared libraries used to compile the JDK itself: egcs-1.1.2, and libstdc++-libc6.1-1.so.2. What I have never heard discussed is how to build a toolchain tha
More>>
--- CUT HERE ---
#include
#include "HelloWorld.h"
#include "stdio.h"
#include
JNIEXPORT void JNICALL Java_HelloWorld_sayHello(JNIEnv *env, jobject obj) {
printf("Hello, world!
");
try {
throw 0;
} catch ( int i ) {
printf("Caught: %d
");
};
printf("~Hello, world!
");
return;
};
--- CUT HERE ---
This is, as has been often said, due to the differant c++ toolchain and shared
libraries used to compile the JDK itself: egcs-1.1.2, and libstdc++-libc6.1-1.so.2. What I have never heard discussed is how to build a
toolchain that does not have these problems.
Right now, my biggest problem appears to be chicken and egg. I have tried building egcs under slackware, and it cannot compile the libstdc++ it includes. It appears that this is a problem with my (newer, of course) libc.
So the question is this: All of the applications on my box, including Oracle, mozilla, netscape and the infamous JDK1.4 seem to be using either egcs-1.1.2 or gcc-2.95.3, seem to be linking to one of two oddly named libstdc++ instances, and seem to be pretty happy with doing it. Somebody must have agreed that this toolchain was 'the thing to use' to compile compatable c++ for many linuxes. So where did they get the toolchain, and where can I get it?
Also, can you define FCS, and tell me if it relates to this discussion? I
noticed it in the blackdown package names, and suspect that it's some standard that I should have read long, long ago. But web searches turn up too much cruft to be useful.
If I can find such a toolchain, I'd be happy to recompile it with itself for compatibility with other systems and make it availiable to others.
<<Less