HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Linking issue
Operating System - Linux
1828286
Members
3351
Online
109975
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-28-2007 09:09 PM
05-28-2007 09:09 PM
Linking issue
Hello All,
While doing compilation using makefile I was getting the following error:
ld: Unsatisfied symbol "initialize(int)" in file srv.o
I had also linked the library in which initialize function is there but still I am getting the above error.
I tried using -Wl,-yinitialize option to find what is referencing it but got the following error:
g++: -initialize: linker input file unused because linking not done
I think linking is not done properly.
Kindly help me out.
Thanks,
Mitalee
While doing compilation using makefile I was getting the following error:
ld: Unsatisfied symbol "initialize(int)" in file srv.o
I had also linked the library in which initialize function is there but still I am getting the above error.
I tried using -Wl,-yinitialize option to find what is referencing it but got the following error:
g++: -initialize: linker input file unused because linking not done
I think linking is not done properly.
Kindly help me out.
Thanks,
Mitalee
- Tags:
- g++
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2007 06:29 PM
05-29-2007 06:29 PM
Re: Linking issue
If you look closely at the linker message you see the function name with its prototype, that means it is mangled. Your -Wl,-y option will fail because that symbol isn't mangled. But it seems like g++ isn't passing that directly to ld.
You can bypass g++ by doing:
$ export LDOPTS="-Wl,-yinitialize"
If you were using aCC, you could use "-Wf,-o" to see both the mangled and demangled name of your unsat. With your foreign devil driver, you'll have to use "nm -px srv.o | fgrep initialize" to find the mangled name.
If srv.o, is a C source, you need to use:
extern "C" return-type initialize(int);
Then the name won't be mangled.
>I had also linked the library in which initialize function
What does this show?
$ nm -pxA your-lib | fgrep initialize
You can bypass g++ by doing:
$ export LDOPTS="-Wl,-yinitialize"
If you were using aCC, you could use "-Wf,-o" to see both the mangled and demangled name of your unsat. With your foreign devil driver, you'll have to use "nm -px srv.o | fgrep initialize" to find the mangled name.
If srv.o, is a C source, you need to use:
extern "C" return-type initialize(int);
Then the name won't be mangled.
>I had also linked the library in which initialize function
What does this show?
$ nm -pxA your-lib | fgrep initialize
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
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP