- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Creating a shared object
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
06-17-2008 12:22 AM
06-17-2008 12:22 AM
Re: Creating a shared object
I added the "-fpic" to all the libs the my sl is being linked with and this solved the problem!!!
Now I have some running problems, but this is for a different thread.
tx all for the good answers.
shlom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2008 07:02 PM
12-08-2008 07:02 PM
Re: Creating a shared object
In response to the previous question:
"I will have to change the extension to "sl" - don't I?"
the response was:
"You don't "have" to but it is a good idea.
Otherwise ld won't find it with -ltest without extra work."
My application (for reasons I won't go into) depends on the shared library extensions to end in .so. As such, I don't want to change them to .sl. Can you please explain to me what "extra work" I need to do to make ld find my .so files? Right now, it can't find them unless I rename them to .sl.
Thank you so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2008 07:18 PM
12-08-2008 07:18 PM
Re: Creating a shared object
Oops, I don't know if this confused anyone but this should say:
On PA you use .sl. On IPF you use .so.
>Vineet: I know this thread is closed, but I have a question
You should create your own thread so you can assign points and if useful include a URL to point to this thread.
>I don't want to change them to .sl. Can you please explain to me what "extra work" I need to do to make ld find my .so files?
You could do two things:
1) Create a symlink that points the .sl to the .so.
2) Change your link line to have: -l:libtest.so
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2008 07:42 PM
12-08-2008 07:42 PM
Re: Creating a shared object
As for your suggestion, I actually tried to use -l:, but it didn't work. I suspect this is because of the last sentence in the following excerpt from a doc on ld:
-l: library Search the library specified. Similar to the -l option except the current state of the -a option is not important. The library name must contain the prefix lib and end with a suffix of .a or .sl.
I got this from:
http://www.informatik.uni-frankfurt.de/doc/man/hpux/ld.1.html
I think it will only look for .a or .sl...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2008 08:10 PM
12-08-2008 08:10 PM
Re: Creating a shared object
I have no problems with: -L. -l:libfoo.so
>I suspect this is because of the last sentence in the following excerpt from a doc on ld:
Only the recommended/official suffixes are listed. But your issue could be due to the change in the linker. ld(1) now says:
The library name can be any valid filename. (Note that previous releases required that the library name contain the prefix lib and end with a suffix of .a or .sl.)
- « Previous
-
- 1
- 2
- Next »