- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Libraries
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
12-23-2003 04:20 AM
12-23-2003 04:20 AM
Libraries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2003 07:22 AM
12-23-2003 07:22 AM
Re: Libraries
1) Compile each object as position independent code (PIC); for aCC that is the +z option.
aCC +z -c module1.c
aCC +z -c module2.c
aCC +z -c module3.c
The -c option tells aCC not to invoke the link editor (ld) phase and simply creat unlinked object files (module1.o, module2.o, module3.o).
2) Now invoke aCC using the -b option to create a shared library and -o to name the library output file.
aCC -b -o mymodules.sl module1.o module2.o module3.o.
The steps are similar in whatever development system you are using.
The arguments for the ANSI C compiler are also the same; simply replace aCC with cc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2003 07:26 AM
12-23-2003 07:26 AM
Re: Libraries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2003 03:44 PM
12-24-2003 03:44 PM
Re: Libraries
if you can say why this is required, some alternatives may come up.
--
ranga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2003 07:59 PM
12-24-2003 07:59 PM
Re: Libraries
Asuming that is the case, you do not need a C compiler to convert the libs:
# cd /your/path/to/lib
# mkdir tmp
# cd tmp
# ar x ../libxxx.a
# ld -b -o ../liborg.sl *.o
# cd ..
# rm -rf tmp
Enjoy, Have FUN! H.Merijn