generating 16bits and 32bits??

Hello!!

The question is: can I generate a 16bits AND a 32bits executable from the same source-code??

Thanks,
Marco Remmerde,
WARP11  Cap Gemini Netherlands
marco71Asked:
Who is Participating?
 
rwilson032697Connect With a Mentor Commented:
Yes.

To generate the 16 bit app you will need to compile with Delphi 1 (shipped with all 32 bits versions of Delphi - D2, D3 & D4).

To generate the 32 bit version you will need to use D2, D3 or D4.

Their are a number of problems which will need to be dealt with by using IFDEFs eg:

{$IFDEF WIN32} // its the 32 bit build
// Do the 32 bit specific stuff here
{$ELSE} // its the 16 bit build
// do the 16 bit specific stuff here.
{$ENDIF}

You will notice a number of the components you can download from the net offer support for both 16 bit and 32 bit versions.

However - it is a lot of work and a significant maintenance hassle to do this. Sometimes its easier to do it with two different source trees. Issues like differences between component support for 16/32 bit can make life very sticky.

Cheers,

Raymond.
0
 
marco71Author Commented:
Thanks for your answer!!
I've already considered your answer by myself, but thanks anyway. I'm affraid that your answer is the only way to generate both a 16 bits and a 32 bits exe...


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.