- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- dlsym error
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
11-20-2009 03:26 AM
11-20-2009 03:26 AM
dlsym error
I have created a shared library as below:
1. # aCC -c +z myshlib.cxx
2. # ld -b -o libtest.so myshlib.o
Now I wrote a sample program which loads this library through dlopen() and loads succesfully. When I search a symbol using dlsym it flashes an error saying unknown symbol. Here is the steps:
3. # aCC sample.cxx -o result
4. ./result
dlsym: Unknown symbol sum
I have attached both myshlib.cxx and sample.cxx
Below is the machine details and compiler version.
# uname -a
HP-UX bv750 B.11.31 U ia64 0223118237 unlimited-user license
# aCC -V
aCC: HP C/aC++ B3910B A.06.23 [May 18, 2009]
Any inputs will be greatly appreciated. Thank you.
- Tags:
- dlsym
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2009 08:51 PM
11-20-2009 08:51 PM
Re: dlsym error
if you dont want certain symbols to be mangled, use them within an 'extern "C"{}' block...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2009 10:40 AM
11-21-2009 10:40 AM
Re: dlsym error
Right. Also your pointer to function should be in one too:
extern "C" {
typedef int (*PIFII)(int, int);
}
...
PIFII fun;
fun = (PIFII)dlsym(dl_handle, "sum");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2009 06:10 AM
11-24-2009 06:10 AM
Re: dlsym error
Can anyone suggest a material regarding the given solution to learn about it and more.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2009 04:28 PM
11-24-2009 04:28 PM
Re: dlsym error
Not much here:
http://docs.hp.com/en/14487/gloss.htm#n
Here is the ia64 mangling rules:
http://www.codesourcery.com/public/cxx-abi/abi.html#mangling
Basically you need to do mangling if you want to have overloading of functions and nested functions.