info-inventor-dev
[Top] [All Lists]

[PATCH] gcc 3.2 support for external nodes

To: info-inventor-dev@xxxxxxxxxxx
Subject: [PATCH] gcc 3.2 support for external nodes
From: Robert Spier <rspier@xxxxxxxxx>
Date: Wed, 12 Mar 2003 17:33:42 -0800
Sender: info-inventor-dev-bounce@xxxxxxxxxxx
User-agent: User-Agent: Wanderlust/2.10.0 (Venus) XEmacs/21.4 (Military Intelligence)
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);


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] gcc 3.2 support for external nodes, Robert Spier <=