Languages and Scripting

Re: Undefined type info of std::length_error

 
SOLVED
Go to solution
Ildefonso Zanette
New Member

Undefined type info of std::length_error

I'm trying to build a shared library that will be used by Oracle as an external procedure.
This shared library works fine when I try to call it using a test program built in c++. However, when I call it from Oracle, it complains about a undefined symbol:

ORA-06522: Unsatisfied data symbol '_ZTISt12length_error' in load module
'/oracle_10/product/lib/libtriggerfish.sl'.

When I search for this symbol on my library, it's undefined:

# nm -C lib* | grep length
[72]|0|0|OBJT|GLOB|0|UNDEF|type info of std::length_error

Is there a linker option that resolves this reference to me?
I tried to compile/link using the -Wl,-a,archive option, but had no success.

Thanks in advance,

Ildefonso.
3 REPLIES 3
Dennis Handly
Acclaimed Contributor
Solution

Re: Undefined type info of std::length_error

What HP-UX version are you using? What version of aC++ or g++ are you using?

>Is there a linker option that resolves this reference to me?

If you are using your shlib as a plugin for C code, you must provide the C++ runtime:
http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/Online_Help/distributing.htm#linking
Ildefonso Zanette
New Member

Re: Undefined type info of std::length_error

Thanks for your fast answer Dennis. That link that you sent solved my problem.

Best Regards,

Ildefonso
Ildefonso Zanette
New Member

Re: Undefined type info of std::length_error

I followed the suggestion of the article that Dennis pointed out and added these libraries in this order:

-lstd_v2 -lCsup -lunwind -lm

This made that type defined in my shared library.