The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
CRC Code namrata5 High Level Programming 3 10-08-2007 07:01 AM
how i prepare a c++ code(c code) for implementing my own protocol format amitpansuria High Level Programming 1 09-06-2007 08:09 PM
SSH key code versus server key code Texan Security 1 04-12-2006 08:57 AM
Return code from PL/SQL Code Shaz UNIX for Advanced & Expert Users 7 06-03-2003 07:56 AM
code help bb00y High Level Programming 3 10-12-2002 05:45 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 06-22-2004
Registered User
 

Join Date: Jun 2004
Posts: 1
32-bit code with gcc

I want to create a 32 bit shared library. I am using following commands

1. gcc -c test1.c

2. ld -b test1.o -o test1.sl

But this creates 64 bit shared library. Unix version of the server on which I am working is HP-UX 11.11
__________________
Amol Chavan
Reply With Quote
Forum Sponsor
  #2  
Old 06-22-2004
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,616
Looking at the gcc man page, I see
Code:
      -m32
      -m64
          Generate code for a 32-bit or 64-bit environment.  The 32-bit
          environment sets int, long and pointer to 32 bits.  The 64-bit
          environment sets int to 32 bits and long and pointer to 64 bits.
So maybe -m32 is needed. But I don't use gcc so I'm not sure.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:56 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0