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
Compilation error : Please help jagan_kalluri High Level Programming 1 05-20-2008 01:48 PM
Kernel compilation mankrish UNIX for Dummies Questions & Answers 3 07-05-2007 10:05 PM
compilation error smanu High Level Programming 2 12-29-2006 07:11 AM
Regarding compilation error. sweta High Level Programming 1 12-10-2006 08:30 AM
gcc compilation collins High Level Programming 3 01-19-2005 09:51 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 06-26-2008
Read Only
 

Join Date: Jun 2006
Posts: 105
64-Bit gcc Compilation

Hi All
I have a question on the compilation

Assume i am working on 64 bit Linux OS.

i am making shared objects and libraries required for our project.
Can i compile 32 bit libraries using gcc of 64 -bit OS?

Or
Is there any restriction in the 32-bit or 64-bit compilers when trying to link 32-bit libraries.

Let me know if i am not clear.

Regards
Dhana
Reply With Quote
Forum Sponsor
  #2  
Old 07-01-2008
Sivaswami's Avatar
Registered User
 

Join Date: Mar 2007
Location: India
Posts: 58
it depends on M/c Arch.
Reply With Quote
  #3  
Old 07-01-2008
Registered User
 

Join Date: Jun 2008
Posts: 19
Yes. -m32.
But let linker know a location of 32-bits libraries (you even might not have them installed yet).
Reply With Quote
  #4  
Old 07-04-2008
Sivaswami's Avatar
Registered User
 

Join Date: Mar 2007
Location: India
Posts: 58
I doubt how will you run a 32 bit file in 64 bit arch ?
or is this just compiling ?
Reply With Quote
  #5  
Old 07-04-2008
Registered User
 

Join Date: Jun 2008
Posts: 19
Once you have all required 32-bit libraries you can run 32-bits executable on 64-bit OS.
Well-know example is skype.
Reply With Quote
  #6  
Old 07-08-2008
Sivaswami's Avatar
Registered User
 

Join Date: Mar 2007
Location: India
Posts: 58
How to dynamically modify the Library path in that case ?
Reply With Quote
  #7  
Old 07-09-2008
Registered User
 

Join Date: Jun 2008
Posts: 19
Depends on your OS.

For Linux the simplests way is to set LD_LIBRARY_PATH.
For example
export LD_LIBRARY_PATH=/lib32:/usr/lib32
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux, solaris

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:41 PM.


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