DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C (http://www.daniweb.com/forums/forum118.html)
-   -   Can I run Linux code (32bit machine) in Linux (64bit machine) (http://www.daniweb.com/forums/thread54142.html)

santosdas Sep 4th, 2006 6:16 am
Can I run Linux code (32bit machine) in Linux (64bit machine)
 
Hi,

I've c source code developed in 32-bit linux machine. Can I run it in 64-bit linux machine.

Thank you.
Santos

Grunt Sep 4th, 2006 6:48 am
Re: Can I run Linux code (32bit machine) in Linux (64bit machine)
 
That depends on the code.

Salem Sep 4th, 2006 1:45 pm
Re: Can I run Linux code (32bit machine) in Linux (64bit machine)
 
Providing the author did the job properly, all you need to do is recompile it on the target machine.

Ancient Dragon Sep 4th, 2006 8:11 pm
Re: Can I run Linux code (32bit machine) in Linux (64bit machine)
 
unlike MS-Windows, not all *nix machines were created equally. A 32-bit program compiled on one *nix computer may or may not run on another 32-bit *nix computer, unless the hardware is identical. There are many different flavors of linux/unix computers and they run many different chip sets (or whatever they are called) (80x88, risk, etc). Programs have to be recompiled for each of these different machine types.

John A Sep 4th, 2006 9:45 pm
Re: Can I run Linux code (32bit machine) in Linux (64bit machine)
 
Yes, generally you must recompile code for different archs/non-standard kernels in Linux.

[offtopic]Mac OS X Leopard has a special backwards-compatibility regarding 64 and 32 bit apps[/offtopic]

Rashakil Fol Sep 5th, 2006 1:24 am
Re: Can I run Linux code (32bit machine) in Linux (64bit machine)
 
In some distributions you can, if you're on the AMD64, i.e. x86-64 architecture, since it's a superset of x86 -- there are issues that come up, like the fact that you need thirty-two-bit libraries /and/ sixty-four-bit libraries installed on the system.


All times are GMT -4. The time now is 5:23 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC