NO

Author Topic: How to Cross Compile 32-Bit  (Read 4034 times)

Offline daniel_bingamon

  • Member
  • *
  • Posts: 22
How to Cross Compile 32-Bit
« on: October 07, 2020, 08:04:32 PM »
I want an application to be cross compiled as 32-bit so that it will run on 32-bit machines.
What to I need to do in "Project Options" to set this?

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: How to Cross Compile 32-Bit
« Reply #1 on: October 08, 2020, 10:01:01 AM »
What exactly you need?
Cross-compile is a process to produce on a machine executables that will run on other machines having OS and/or processors different from the the compiling one.
PellesC actually supports only one processor family (IA-32 and IA-64), and only one OS: MS-WIN.
Because each 64 bits machine can run 32bits executables we cannot strictly speak of cross-compilation when the code is produced for a 32bits processor on a 64bits machine.
In the past, when PellesC come with ARM processors support, there was some kind of cross-compilation, but only for MS-WIN OS.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Robert

  • Member
  • *
  • Posts: 247
Re: How to Cross Compile 32-Bit
« Reply #2 on: October 08, 2020, 04:02:41 PM »
What exactly you need?
Cross-compile is a process to produce on a machine executables that will run on other machines having OS and/or processors different from the the compiling one.
PellesC actually supports only one processor family (IA-32 and IA-64), and only one OS: MS-WIN.
Because each 64 bits machine can run 32bits executables we cannot strictly speak of cross-compilation when the code is produced for a 32bits processor on a 64bits machine.
In the past, when PellesC come with ARM processors support, there was some kind of cross-compilation, but only for MS-WIN OS.

Hi Frankie:

I'm not sure what Daniel needs but I was wondering how to change an existing 64 bit project to a 32 bit project in the IDE.

How can a project be compiled for 64 bit and then, with a click of "The Magic Button" in the IDE, compile for 32 bit?




Offline Robert

  • Member
  • *
  • Posts: 247
Re: How to Cross Compile 32-Bit
« Reply #3 on: October 08, 2020, 04:12:14 PM »
What exactly you need?
Cross-compile is a process to produce on a machine executables that will run on other machines having OS and/or processors different from the the compiling one.
PellesC actually supports only one processor family (IA-32 and IA-64), and only one OS: MS-WIN.
Because each 64 bits machine can run 32bits executables we cannot strictly speak of cross-compilation when the code is produced for a 32bits processor on a 64bits machine.
In the past, when PellesC come with ARM processors support, there was some kind of cross-compilation, but only for MS-WIN OS.

Hi Frankie:

I'm not sure what Daniel needs but I was wondering how to change an existing 64 bit project to a 32 bit project in the IDE.

How can a project be compiled for 64 bit and then, with a click of "The Magic Button" in the IDE, compile for 32 bit?

Never mind. I found it. Right click on the Project name in the project window, click on Properties, click on Project tab and set the Type in the drop down box.

Offline John Z

  • Member
  • *
  • Posts: 860
Re: How to Cross Compile 32-Bit
« Reply #4 on: October 11, 2020, 04:37:42 PM »
If you are still using PellesC version 9 then you select x86 or x64 on the Project Options Compiler page.  Using either version there can be quite a number of code changes that will need to be made, especially if this is a windows program you are changing.  Just changing the setting from 64 to 32 or 32 to 64 won't automagically fix everything that needs to be changed.

John Z