Operating System - HP-UX
1748169 Members
4262 Online
108758 Solutions
New Discussion юеВ

Re: I am getting unresolved symbol error at runtime

 
SOLVED
Go to solution
Rajakumar Kasi
Advisor

I am getting unresolved symbol error at runtime

Hi Experts,
I am getting below unresolved symbol error at runtime
/usr/lib/dld.sl: Unresolved symbol: __ct__13Iostream_initFv_1 (code) from /apps/myapps/bin/libxalan-c.sl.110

/usr/lib/dld.sl: Unresolved symbol: __ct__13Iostream_initFv_1 (code) from /apps/myapps/bin/libxalan-c.sl.110

Could you please help me to resolve the above run time issue?

Thanks and Regards,
Rajakumar K.
17 REPLIES 17
Dennis Handly
Acclaimed Contributor

Re: I am getting unresolved symbol error at runtime

These are aC++ -AP iostream unsats. You should have -lstream on your link line.

What language is your executable?
You can't mix -AP and -AA or g++.
Rajakumar Kasi
Advisor

Re: I am getting unresolved symbol error at runtime

Hi Dennis,
I am using GNU make and below HPUX C++ (aCC) compiler
PHSS_28880 1.0 HP aC++ -AA runtime libraries (aCC A.03.50)

I put -lstream in the linker command and still I am getting "/usr/lib/dld.sl: Unresolved symbol: quiet_NaN__14numeric_limitsXTd_SFv (code) from /data/CCPE/x_kasir/tce07/bin/libxalan-c.sl.110" error at run time.

Do you feel above error is a linker/compile problem?

I am not so good in HPUX builds.
Could you please let me know what is -AP, -AA and g++? Are these linker options?

Thanks and Regards,
Rajakumar K
Rajakumar Kasi
Advisor

Re: I am getting unresolved symbol error at runtime

Hi Dennis,
Do you know which library contains the symbol "numeric_limits"?

Thanks and Regards,
Rajakumar K

Re: I am getting unresolved symbol error at runtime


> I put -lstream in the linker command and still I am getting "/usr/lib/dld.sl
> : Unresolved symbol: quiet_NaN__14numeric_limitsXTd_SFv (code)
> from /data/CCPE/x_kasir/tce07/bin/libxalan-c.sl.110" error at run time.

Use -lstd. Better is to recompile (rebuild) you application with -AP or whichever is appropriate.

> Do you feel above error is a linker/compile problem?

As the error says the symbol quiet_NaN__14numeric_limitsXTd_SFv is not resolved in your application. It is not a linker/compiler problem. It is most probably due to missing -l.

> Could you please let me know what is -AP, -AA and g++?
> Are these linker options?

These are compiler options. You could do "man aCC" and get the information about these options. Also in www.hp.com/go/aCC.

-AP: Turns off -AA mode. Uses the older C++ runtime libraries. This is the default.

-AA: Turns on newly supported ANSI C++ Standard features .... Objects and libraries compiled with -AA are binary incompatible with objects and libraries compiled without -AA.

g++: Actually it is -Ag++. It enables partial support for the GNU C++ dialect. It is supported only from A.03.80 onwards with +hpxstd98 option.

You could use c++filt to get a readable form of quiet_NaN__14numeric_limitsXTd_SFv.
quiet_NaN__14numeric_limitsXTd_SFv ==> static numeric_limits::quiet_NaN()
Solution

Re: I am getting unresolved symbol error at runtime

> Do you know which library contains the symbol "numeric_limits"?
libstd
Dennis Handly
Acclaimed Contributor

Re: I am getting unresolved symbol error at runtime

>PHSS_28880 HP aC++ -AA runtime libraries (aCC A.03.50)

This is very old, you can update to an newer one, PHSS_33945.

>Could you please let me know what is -AP, -AA and g++? Are these linker options?

The first two are aC++ options, g++ is the Gnu C++ compiler. How are you building your application? Is it C and you are calling a aC++ shlib?

>Do you know which library contains the symbol "numeric_limits"?

Naturally. :-) If you are compiling and linking with aCC, this is automatically supplied. I would recommend this.

Otherwise, you should look at the following if you are mixing languages:
http://docs.hp.com/en/14672/Help/distributing.htm#apps

>Kannan: g++: Actually it is -Ag++.

No, g++ is g++, the foreign devil compiler. ;-)
Rajakumar Kasi
Advisor

Re: I am getting unresolved symbol error at runtime

Hi Dennis,
>How are you building your application? Is it C and you are calling a aC++ shlib?
I am building my application with aCC compiler (PHSS_28880 1.0 HP aC++ -AA runtime libraries (aCC A.03.50))
Here may I know what is "aC++ shlib", is it aCC?

The library which contains the numeric_limits symbol is not automatically getting resolved at run time with libxalan-c.sl.110 and ldd also not showing that. so looks like I need to pass the library which contains numeric_limits symbol to the libxalan-c.sl.110 linker command. But you are telling it is automatically supplied while using aCC. So I could not understand this point.

Please clarify.

Thanks and Regards,
Rajakumar K

Rajakumar Kasi
Advisor

Re: I am getting unresolved symbol error at runtime

Hi Dennis,
Please provide your answers based on aCC compiler that is specific to PHSS_28880 1.0 HP aC++ -AA runtime libraries (aCC A.03.50) version if possible.
Because I cannot use any other compiler for this particular build.

libxalan-c.sl.110 is linked with aCC compiler and I also using C compiler while building.


Thanks and Regards,
Rajakumar K
Rajakumar Kasi
Advisor

Re: I am getting unresolved symbol error at runtime

Hi Dennis,
Are aC++ and aCC compilers same or different?

Thanks and Regards,
Rajakumar K