The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Create individual tgz files from a set of files amitg UNIX for Dummies Questions & Answers 4 04-29-2008 09:13 AM
compare files and create new with awk tonet Shell Programming and Scripting 7 12-27-2007 10:05 AM
on how to create files fiol73 UNIX for Dummies Questions & Answers 2 12-19-2006 07:41 AM
How to compare several files and create a new one alxkn UNIX for Dummies Questions & Answers 1 07-17-2006 11:04 PM
Trying to create files from a file jordimirobruix Shell Programming and Scripting 5 11-02-2004 07:33 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 3 Weeks Ago
suresh_kb211 suresh_kb211 is offline
Registered User
  
 

Join Date: May 2009
Posts: 28
how to create .so files from .o files in HP-UX

Hi,
I need to create .so files from .o files(compiled c files) in HP-UX env. I dont have GCC in the HP-UX server. Is there any other way to create without using GCC.

I have done this in solaris.I had been using this command
Code:
/opt/SUNONE8/SUNWspro/bin/cc -G -o  abc.so ./abc.o $ORACLE_HOME/lib/libsqlplus.a -lc -lcrypt
for creating .so files from .o files (compiled c files) in sun OS.
Now i have to create the same in HP-UX. Please give me the HP equivalent tool/command which creates .so files like in SUN (no GCC).

Thanks in Advance.
  #2 (permalink)  
Old 3 Weeks Ago
pogdorica's Avatar
pogdorica pogdorica is offline
Registered User
  
 

Join Date: Oct 2009
Location: Madrid
Posts: 53
do you know what it is the HPUX compiler 'cc' ???

I think you should use the options: "-shared -o " to create dynamic library.
  #3 (permalink)  
Old 3 Weeks Ago
suresh_kb211 suresh_kb211 is offline
Registered User
  
 

Join Date: May 2009
Posts: 28
i used cc. But with options "-G -o" as i used in solaris. Its throwing this error
Quote:
(Bundled) cc: warning 480: The -G option is available only with the C/ANSI C product; ignored.
/usr/ccs/bin/ld: Unsatisfied symbols:
main (Not referenced yet! Probably due to -u option)
i used "-s -o", and got this error,
Quote:
/usr/ccs/bin/ld: Unsatisfied symbols:
main (Not referenced yet! Probably due to -u option)
if i give "-shared -o", it shows "options -h a r e d not available,ignored".
  #4 (permalink)  
Old 3 Weeks Ago
pogdorica's Avatar
pogdorica pogdorica is offline
Registered User
  
 

Join Date: Oct 2009
Location: Madrid
Posts: 53
Oh, sorry, i think that i was mistaken about the platform.

Try this:

Code:
   $ ld -b -o libfunctions.sl function1.o function2.o function3.o
  #5 (permalink)  
Old 3 Weeks Ago
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,568
Looks like you are using the HPUX cc which is a basic KR c , its there mainly to recompile the HPUX kernel...
Either you pay for HP ANSI C (but there is a C++ lib patch...free... used for e.g. oracle...)
Or you install gcc you get at your prefered HP archive&porting site

---------- Post updated at 14:34 ---------- Previous update was at 11:05 ----------

You can download from here:
Search Archive 2.0.0
  #6 (permalink)  
Old 2 Weeks Ago
suresh_kb211 suresh_kb211 is offline
Registered User
  
 

Join Date: May 2009
Posts: 28
Award Winner

It worked... It worked..

I am able to build the so's using ld command. Thanks Pgodorica, VBE.. u r great....
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:17 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0