Author Topic: How to create 32-bit app from C::B on 64-bit architecture?  (Read 3982 times)

Offline kathbeau

  • Multiple posting newcomer
  • *
  • Posts: 17
How to create 32-bit app from C::B on 64-bit architecture?
« on: March 13, 2015, 04:38:07 pm »
I have been working on Linux for only a few months, so... still a newbie.

My dev environment is C::B 13.12, wxWidgets 3.0, g++/gcc 4.71, running on 64-bit Debian 7.

I need to be able to create a 32-bit build of my C::B app, but I don't know how to specify that.

And here's a curiosity: I cross-build this app on my Win7-64 machine with the same version of C::B. On this machine, the default C::B output seems to be 32-bit. (I am 99% certain of that, because the app calls a DLL that I build for Windows using a compiler for which I do know how to create both 64-bit and 32-bit output.)

So I guess this is a two-part question:

1. How can I create both 64-bit and 32-bit apps from my Linux environment?
2. Does the Windows version of C::B install with 32-bit Mingw, and therefore create only 32-bit?

Thanks for your help with this.

Kathleen

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: How to create 32-bit app from C::B on 64-bit architecture?
« Reply #1 on: March 14, 2015, 12:42:32 am »
On the Code::Blocks side you have to add the Compiler option -m32 in the CB Project settings under "Compiler Settings" "other options"; but, you still need to do what ever is needed to get Debian to have the 32 bit files needed.

Your second question the answer is yes; CB ships only an 32bit version of the MinGW GCC compiler.

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline kathbeau

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: How to create 32-bit app from C::B on 64-bit architecture?
« Reply #2 on: March 15, 2015, 08:47:16 pm »
Thanks for your help, Tim.

Kathleen