Page 1 of 1

Build to 64-bit

Posted: Mon Mar 17, 2014 2:49 am
by meneale
Hello HMGFORUM,

Is There any way to build HMG projects in 64 bit for fast processing?

Thanks

Re: Build to 64-bit

Posted: Mon Mar 17, 2014 8:02 am
by Rathinagiri
HMG is based on win32api. If it is compatible or identical API functions are there in 64Bit processing, then it can be done easily I think.

Re: Build to 64-bit

Posted: Fri Mar 28, 2014 1:52 am
by srvet_claudio
The theory is as follows:

1) Build the Harbour libraries with MinGW64 (Harbour 64 bits)

2) Build the HMG libraries with Harbour 64 bits and MinGW64 (HMG 64 bits)

3) Compile the applications with HMG 64 bits and MinGW64


But there are some practical problems when porting HMG to 64 bits in the C code:

1) Change Get/SetClassLong and Set/GetWindowLong for Get/SetClassLongPtr and Get/SetWindowLongPtr

2) Check all assignments of types and pointers, see http://www.viva64.com/en/a/0004/

Re: Build to 64-bit

Posted: Fri Mar 28, 2014 4:02 am
by Rathinagiri
Now, can we use pre-compiler directives to use 32 bits or 64 bits in the same code?

Re: Build to 64-bit

Posted: Fri Mar 28, 2014 12:46 pm
by srvet_claudio
Rathinagiri wrote:Now, can we use pre-compiler directives to use 32 bits or 64 bits in the same code?
Yes, and Get/SetClassLongPtr and Get/SetWindowLongPtr are compatible with 32 and 64 bits.

Build to 64-bit

Posted: Fri Mar 28, 2014 1:41 pm
by Pablo César
For that reason, should it have two HMG versions for that.

Because Windows version early 64 bits (Windows early Win7 and Win7 in 32bits) will not recognize apps in 64bits, then will be necessary to choose when is needed to build apps in 32 when in 64bits... I guess...