944,162 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 3877
  • C RSS
Sep 4th, 2006
1

Can I run Linux code (32bit machine) in Linux (64bit machine)

Expand Post »
Hi,

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

Thank you.
Santos
Similar Threads
Reputation Points: 13
Solved Threads: 0
Newbie Poster
santosdas is offline Offline
1 posts
since Sep 2006
Sep 4th, 2006
1

Re: Can I run Linux code (32bit machine) in Linux (64bit machine)

That depends on the code.
Reputation Points: 197
Solved Threads: 12
Junior Poster
Grunt is offline Offline
147 posts
since Jul 2006
Sep 4th, 2006
1

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.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005
Sep 4th, 2006
0

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.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
Sep 4th, 2006
1

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]
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Sep 5th, 2006
2

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.
Team Colleague
Reputation Points: 1135
Solved Threads: 173
Super Senior Demiposter
Rashakil Fol is offline Offline
2,480 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: how to copy data into array or memory ?
Next Thread in C Forum Timeline: how to generate a state transition diagram in c





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC