0

I am using Delphi 7 and I love it due to small exe size, and no worries about 64bit datatypes as I really don't need it.

Now as WinXP is dead, and Win7 is also in its last stage, I really see a need to migrate to newer version of Delphi, and have XE3 installed now. My source code uses Pointer(s), String(s) (not AnsiString), DWORD, Cardinal etc. I don't want to make my code 64bit compatible as I really don't need it.

As far as I know, 32bit codes can run fine on 64bit OS, and I just want to confirm that is there any option in XE5 to compile exe like I did in Delphi7, no need to worry about OS Architecture, as Delhi 7 compiler always compiled 32bit exe, and datatypes are always 32bit regardless of System Architecture.

So, in short, I just need to upgrade my IDE, not the source, not the support for another CPU architecture. Just plain 32bit application, which can run in both 32bit and 64bit environment. Is it possible?

Regards,

Shadab Mozaffar
  • 111
  • 1
  • 2
  • Is what possible, exactly? You say you already have XE3 installed, and most D7 code will compile in it and XE5 without modification, so what are you asking? – MartynA Oct 17 '18 at 16:59
  • 1
    Well, you'll have to deal with Unicode strings probably. And the executable size will be jigger but then you shouldn't worry about that. – David Heffernan Oct 17 '18 at 17:13
  • @MartynA I know most D7 will compile just fine, but what about datatypes on runtime? Like i : Integer compiled as 32bit exe, and run on 32bit system, will have 4 byte size, but what if that 32bit exe is run on 64bit system? Will it remain 4byte or will change to 8byte? – Shadab Mozaffar Oct 17 '18 at 17:26
  • 1
    Why would a 32bit exe suddenly change its data sizes just because it's run on a 64bit system? If that happened it would break every existing 32bit exe run on 64bit Windows. – MartynA Oct 17 '18 at 17:29
  • @DavidHeffernan Yes Bro, I think changing my string declaration to AnsiString can make it safe. But what I am concerned for is already posted as comment to MartynA – Shadab Mozaffar Oct 17 '18 at 17:29
  • @MartynA Aha, that means Integer, WORD, DWORD will behave same like they did in Delhi 7 if I compile only 32bit exe. Thanks, I will try and update here. Just another doubt, will changing my String declarations to AnsiString will be good enough to avoid any issue with string manipulation? – Shadab Mozaffar Oct 17 '18 at 17:33
  • 1
    If you treat strings purely as an "opaque" datatype with no attempt to manipulate them at the byte-level (i.e. how they are represented im-memory), you should be able to leave your string declarations as-is. Suck it 'n see ... – MartynA Oct 17 '18 at 17:45
  • 2
    Changing `string` to `AnsiString` won't give identical behaviour for all code because `AnsiString` is now code page aware. Frankly, if you don't want to change your code you may be better off sticking with Delphi 7. – David Heffernan Oct 17 '18 at 17:53

0 Answers0