Natural Userexit in C++ on SLES 10

Hallo,

trying to compile and link a Natural Userexit (coded in C++, CALL INTERFACE4) in Natural 6.3.4 on SLES 10 I found a hint in the documentation to use gcc 3.3.

The installed gcc version on SLES 10 is currently 4.1.2; so the compiled and linked Natural-ELF references “libstdc++.so.6” (in contrast to “libstdc++.so.5” which has been used by delivered Natural ELFs). Starting the application with the ambiguous use of c+±library references (libstdc++.so.5 and(!) libstdc++.so.6) it abended due to an invalid pointer referenced by class destructor :shock:.

There was a forum entry for RedHat 5 to install the “compat”-RPMs (compat-gcc-33 and compat-libstdc+±33) in order to use the “old” gcc 3.3, but I can’t find any RPMs which have been released for SLES 10 with the required functionality.

Questions:

:?: Are there any “compat”-packages for SLES 10?
:?: If not: which is the recommended way to compile and link Natural-Userexits without incompatible use of C++ runtime libraries?

Martin

Hello,

actually we use Natural 6.3.5 on SLES 10 and the documentation gives a new advice concerning the usability of the different gcc versions:

“The delivered Natural for UNIX was built and tested with the compilers listed below. When relinking Natural during the installation or using the make command, we strongly recommend that you use the same compiler version.
Linux
SUSE Linux Enterprise Server 9: gcc 3.3”

“Additional tests were done without problems with Natural for UNIX relinked with the compilers listed below:
Linux
SUSE Linux Enterprise Server 9: gcc 3.3.3
SUSE Linux Enterprise Server 10: gcc 4.1.2”

Nevertheless Natural 6.3.5 on SLES10 obviously is compiled with gcc 3.3 and therefore furtheron references “libstdc++.so.5”.

So my question from previous post is still up to date: Why isn’t Natural 6.3.5 compiled with gcc 4.x (which is the default compiler for SLES10) and therefore why doesn’t it reference the newer “libstdc++.so.6” in order to avoid the named ambiguous use of different C++ runtime libraries?

Kind regards
Martin

Hello,

Natural is compiled with gcc 3.3 for compatibility reasons.
So it is possible to use the same kit on almost all current SUSE/Redhat
Platforms. This means that a customer can have Natural Installations
on different SUSE/Redhat Platforms without worrying about any compatibility problems.

From your last post it looks like you are trying to link your userexit static
to the natural nucleus. Have you tried to build the userexit as shared
library? Normally this should work, because the shared library can have its own libstdc++.

Regards,
Thomas