[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] gcc 3.2 support for external nodes
Because of the major C++ ABI change, the following patch (or moral
equivalent) is required to use external nodes (i.e. nodes that do not
come with Inventor) and gcc 3.2.
-R
*WDFA
% diff -u lib/database/src/so/SoType.c++{.orig,}
--- lib/database/src/so/SoType.c++.orig Wed Mar 12 14:29:04 2003
+++ lib/database/src/so/SoType.c++ Wed Mar 12 15:11:54 2003
@@ -295,8 +295,14 @@
if (dsoHandle == NULL)
return SoType::badType();
- sprintf(dummyFunc, "initClass__%d%s%s", name.getLength(),
- nameChars, abiName);
+#if ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 2))
+ // Should this test GXX_ABI_VERSION == 102 ?
+ sprintf(dummyFunc, "_ZN%d%s9initClassEv", name.getLength(),
+ nameChars);
+#else
+ sprintf(dummyFunc, "initClass__%d%s%s", name.getLength(),
+ nameChars, abiName);
+#endif
void (*dsoFunc)();
dsoFunc = (void (*)())dlsym(dsoHandle, dummyFunc);