HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- aC++ shared library: Unresolved Symbol: __shlinit
Operating System - HP-UX
1834727
Members
2680
Online
110070
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2001 06:30 AM
05-01-2001 06:30 AM
aC++ shared library: Unresolved Symbol: __shlinit
I have see postings for this from several people but their doesn't seem to be a clear answer provided by those responding:
I am porting some shared libraries from AIX and Solaris for our product to HPUX. I am using the compiler to call the linker. Here is the line that gets called:
/opt/aCC/bin/aCC -b -Wl,+vshlibunsats +u1 +z -D __UNIX__ -D __HPUX__ -D __PRTALL__ pny01.o -L../../clib/ -lsymbol -lnyaamva -lCsup -lc -lC -o libpny.sl
/usr/ccs/bin/ld: Unsatisfied symbols:
__shlinit (first referenced in command line with +I option) (code)
I have updated the aC++ software to the latest version with the appropriate patches, it is now A.03.30 and all libraries and headers are up to date. Also the ld update has been applied.
From output from the linker it looks like the aCC compiler is calling the linker with a +I argument, this is a flag to set the flag to set the initializer function for a shared library. On AIX4.3.3.10 and Solaris7 it is not necessary to set an initializer function if you give the correct arguments.
Is there an override to avoid the requirement of an initializer function or do you have to have one for C++. We don't have to have one for our C libraries.
Help me please, if you can. I am browsing even more of the documentation that I can find on this subject, I have already done an exaustive Web search.
Thanks.
I am porting some shared libraries from AIX and Solaris for our product to HPUX. I am using the compiler to call the linker. Here is the line that gets called:
/opt/aCC/bin/aCC -b -Wl,+vshlibunsats +u1 +z -D __UNIX__ -D __HPUX__ -D __PRTALL__ pny01.o -L../../clib/ -lsymbol -lnyaamva -lCsup -lc -lC -o libpny.sl
/usr/ccs/bin/ld: Unsatisfied symbols:
__shlinit (first referenced in command line with +I option) (code)
I have updated the aC++ software to the latest version with the appropriate patches, it is now A.03.30 and all libraries and headers are up to date. Also the ld update has been applied.
From output from the linker it looks like the aCC compiler is calling the linker with a +I argument, this is a flag to set the flag to set the initializer function for a shared library. On AIX4.3.3.10 and Solaris7 it is not necessary to set an initializer function if you give the correct arguments.
Is there an override to avoid the requirement of an initializer function or do you have to have one for C++. We don't have to have one for our C libraries.
Help me please, if you can. I am browsing even more of the documentation that I can find on this subject, I have already done an exaustive Web search.
Thanks.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2001 07:07 AM
05-01-2001 07:07 AM
Re: aC++ shared library: Unresolved Symbol: __shlinit
Adding -lnsl fixed a similar problem for me.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2001 07:06 AM
05-02-2001 07:06 AM
Re: aC++ shared library: Unresolved Symbol: __shlinit
There is a guide to creating aCC shared libraries at
http://docs.hp.com/hpux/onlinedocs/dev/aCC/a_03_30/distributing.htm
It covers both libraries used by programs built with aCC and libraries that will be used with programs that were not built with aCC.
Note that you should not link your library with -lc -or -lC. The -lC is particularly troublesome because it is a support library for the obsolete CC compiler. Programs cannot mix CC and aCC code.
http://docs.hp.com/hpux/onlinedocs/dev/aCC/a_03_30/distributing.htm
It covers both libraries used by programs built with aCC and libraries that will be used with programs that were not built with aCC.
Note that you should not link your library with -lc -or -lC. The -lC is particularly troublesome because it is a support library for the obsolete CC compiler. Programs cannot mix CC and aCC code.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP