Operating System - HP-UX
1748287 Members
3371 Online
108761 Solutions
New Discussion юеВ

Re: I am getting unresolved symbol error at runtime

 
SOLVED
Go to solution

Re: I am getting unresolved symbol error at runtime

> Are aC++ and aCC compilers same or different?
aCC - HP aC++ compiler
cc, c89, c99 - HP C compiler
Dennis Handly
Acclaimed Contributor

Re: I am getting unresolved symbol error at runtime

>I am building my application with aCC compiler

What version? What options? The default is -AP for PA. Who is the consumer of your shlib?

>may I know what is "aC++ shlib"

An aC++ shlibs is one built with the aC++ compiler. And not C, cfront, gcc nor g++.

>But you are telling it is automatically supplied while using aCC.

It is automatically supplied when creating executables. If you are creating a shlib, you would have to follow the directions on the above URL.

>Please provide your answers based on aCC compiler that is specific to PHSS_28880

I can't. That is a runtime patch, what compiler version are you using? (aCC -V)

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

You need to look at the above URL when mixing languages.

>Are aC++ and aCC compilers same or different?

As Kannan said, aC++ is the name of the product and the driver is aCC(1).
Rajakumar Kasi
Advisor

Re: I am getting unresolved symbol error at runtime

Thanks a lot Dennis and Kannan for your inputs.

Hi Dennis,
>What version? What options? The default is -AP for PA. Who is the consumer of your shlib?
aCC: HP ANSI C++ B3910B A.03.52

I am not using any of the -AP or -AA or g++ options during build.
I chekced for compiler/linker options for my aCC installation online document, but I could not find -AP option and I can find -AA option. Looks like "aCC: HP ANSI C++ B3910B A.03.52" is not supporting -AP option.
If -AP is not supported for "aCC: HP ANSI C++ B3910B A.03.52", then if -AA is not set, it means will it uses the older C++ runtime libraries and if -AA set, it means will it use newly supported ANSI C++ Standard library

Consumer of my shlib is another shared library(*.sl)

For your information uname -a output is
HP-UX pnhpr023 B.11.11 U 9000/800 3481275319 unlimited-user license

>what compiler version are you using? (aCC -V)
aCC: HP ANSI C++ B3910B A.03.52

One general question : If I use only aCC compiler (here I am not using any other compiler) for linking my shared libraries, should I put other shared libraries in the linker command who is having symbols that are refered in my shared library?

Do you know the path of the document for aCC which is equivalent to the document "HP-UX_Linker_and_Libraries_User's_Guide.pdf" as in the attachment.


Thanks and Regards,
Rajakumar K.
Rajakumar Kasi
Advisor

Re: I am getting unresolved symbol error at runtime

Hi Dennis,
May I know from which aCC release, the -AP option available as I could not find -AP option in aCC: HP ANSI C++ B3910B A.03.52 version?

Thanks and Regards,
Rajakumar K
Dennis Handly
Acclaimed Contributor

Re: I am getting unresolved symbol error at runtime

>I am not using any of the -AP or -AA or g++ options during build.

Then you are implicitly using the -AP default. (It wasn't until A.03.33 did we add an explicit option.)

>Consumer of my shlib is another shared library(*.sl)

Is that an aC++ shlib?
What language is the executable?

>should I put other shared libraries in the linker command who is having symbols that are referred in my shared library?

It depends. If only aC++ applications are going to use your shlib, there is no need to add the aC++ runtime shlibs to yours.
Or if these are your other dependent shlibs, you may want to add them, so you don't have to document that the end user must also link these extra shlibs.

>Do you know the path of the document for aCC which is equivalent to the document HP-UX_Linker_and_Libraries_User's_Guide?

There is my URL above and in the same document, you can look at:
http://docs.hp.com/en/14672/Help/libs.htm

>May I know from which aCC release, the -AP option available?

A.03.33. The -AP option is the default. So if your old compiler doesn't recognize it, just leave it off. You can look at old Release Notes:
http://docs.hp.com/en/5992-4209/5992-4209.pdf
Rajakumar Kasi
Advisor

Re: I am getting unresolved symbol error at runtime


Hi Dennis,
>Is that an aC++ shlib?
Yes, this shlib created by aCC compiler and it is called libp.sl
And libp.sl is used by libq.sl and libq.sl is created by cc compiler
And libq.sl is used by libr.sl and libr.sl is created by cc compiler

When an executalbe called exea loads libp.sl into memory, no problem is seen.

When When an executalbe called exeb loads libr.sl into memory, the problem that I reported initially is seen (i.e "/usr/lib/dld.sl: Unresolved symbol: quiet_NaN__14numeric_limitsXTd_SFv (code) from /data/CCPE/x_kasir/tce07/bin/libxalan-c.sl.110")
After linking libxalan-c.sl.110 with -lstd library, above unresolved symbol error is solved.

Above is one set of dependancy
Another set of dependancy is as below
And libp.sl is used by another library called libz.sl and libz.sl is created by cc compiler
When an executable exec loads libz.sl into memory, above unresolved problem is not seen. But both libz.sl and libr.sl linker options are same, but I could not understand what is the wrong with build, the only difference is that no of level of dependancy is different(i.e libr.sl->libq.sl->libp.sl->libxalan-c.sl.110 is one set and libz.sl->libp.sl->libxalan-c.sl.110 is another set)

Do you have any idea why -lstd is needed when loading libr.sl library?

>What language is the executable?
aCC language(PHSS_28880 1.0 HP aC++ -AA runtime libraries (aCC A.03.50))

C language (B3901BA-B.11.02.08-HP C/ANSI C Developer's Bundle for HP-UX 11.0 (S800))


Thanks and Regards,
Rajakumar K
Dennis Handly
Acclaimed Contributor

Re: I am getting unresolved symbol error at runtime

>When an executable called exea loads libp.sl into memory, no problem is seen.

Then this must be a aC++ executable.

>When an executable called exeb loads libr.sl into memory, the problem that I reported initially

Then this must be a C executable.

>When an executable exec loads libz.sl into memory, above unresolved problem is not seen.

Then this must be an aC++ executable or you aren't really using the stuff in libp.sl.

>Do you have any idea why -lstd is needed when loading libr.sl library?

Because libp.sl needs it.

>aCC language ... C language

What is the driver you used to link these 3 executables? That determines what language it is.

Note: It is not important why some of your cases works or not. If you don't follow the directions on mixing languages, it won't always work.
Rajakumar Kasi
Advisor

Re: I am getting unresolved symbol error at runtime

Thanks a lot Dennis Handly and Kannan M Jeganathan.

Your invaluable inputs helped me to resolve my problem.

Regards,
Rajakumar K.