Reputation: 77
I wrote a very simple calculator program in C++ in the IDE DEV-C++.
The code was fine as it compiled alright and ran like it was supposed to, but when I sent it over Skype to a friend he couldn't run it because his machine ran 32-bit Windows, and DEV-C++ compiled my program for 64-bit.
How would I go about compiling it for 32-bit Windows? Do I just need to download the 32-bit version of DEV-C++? If so, can someone link me to it? I looked on their site and I can't find it.
Otherwise how else may I compile it for 32-bit Windows?
UPDATE: I just found an option under "Compiler Options" in Dev-C++ that gives a list with options like so:
Could that be it?
Upvotes: 1
Views: 5149
Reputation: 5432
You've hit upon the answer: you need to tell the compiler to build code for the correct platform. You can do that by selecting 'TDM-GCC 4.8.1 32-bit Release' from that list and recompiling your application.
The three options given for 32-bit and 64-bit (Release, Debug and Profiling), should be used in different circumstances:
Upvotes: 3