ransh
ransh

Reputation: 1712

compiling application with gcc -m32 on 64-bit system

I try to understand the requirements for developing Linux application running on 64-bit OS (with 64-bit architecture). If the code was written for 32-bits architecture, does it mean that on regular compilation (gcc -m32) it will run on the 64-bit system OS, without any problems ?

Thank you, Ran

Upvotes: 1

Views: 473

Answers (1)

Tom Tromey
Tom Tromey

Reputation: 22569

Yes, it will. The only caveats to this are that you need 32 bit libraries to run the program, and 32 bit development packages to compile it. Most distros provide these and make it simple to install them as well.

Upvotes: 2

Related Questions