www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Error when compile with DMD using -m64?

reply Marcone <marcone email.com> writes:
When I compile program in Ly Windows x64 using dmd flag -m64 the 
program not run.
How fix it?
Aug 09 2021
parent reply novice2 <sorry noem.ail> writes:
On Monday, 9 August 2021 at 19:53:48 UTC, Marcone wrote:
 program not run.
compilation errors? runtime errors?
Aug 09 2021
parent reply Marcone <marcone email.com> writes:
On Monday, 9 August 2021 at 19:58:03 UTC, novice2 wrote:
 On Monday, 9 August 2021 at 19:53:48 UTC, Marcone wrote:
 program not run.
compilation errors? runtime errors?
Solved converting long and int.
Aug 09 2021
parent reply Bastiaan Veelo <Bastiaan Veelo.net> writes:
On Tuesday, 10 August 2021 at 01:29:04 UTC, Marcone wrote:
 Solved converting long and int.
Use `size_t` and `ptrdiff_t` instead to make your program compile in both 32 bit and 64 bit modes. https://dlang.org/spec/type.html#aliased-types -- Bastiaan.
Aug 10 2021
parent reply Marcone <marcone email.com> writes:
On Tuesday, 10 August 2021 at 15:55:42 UTC, Bastiaan Veelo wrote:
 On Tuesday, 10 August 2021 at 01:29:04 UTC, Marcone wrote:
 Solved converting long and int.
Use `size_t` and `ptrdiff_t` instead to make your program compile in both 32 bit and 64 bit modes. https://dlang.org/spec/type.html#aliased-types -- Bastiaan.
Thank you very much! Your information was very precious! It worked very well! Now I can create x32 or x64 compatible programs without creating two codes.
Aug 10 2021
parent Bastiaan Veelo <Bastiaan Veelo.net> writes:
On Tuesday, 10 August 2021 at 17:13:31 UTC, Marcone wrote:
 On Tuesday, 10 August 2021 at 15:55:42 UTC, Bastiaan Veelo 
 wrote:
 Use `size_t` and `ptrdiff_t` instead to make your program 
 compile in both 32 bit and 64 bit modes.

 https://dlang.org/spec/type.html#aliased-types

 -- Bastiaan.
Thank you very much! Your information was very precious! It worked very well! Now I can create x32 or x64 compatible programs without creating two codes.
You’re welcome :-) — Bastiaan.
Aug 10 2021