Build to 64-bit

Moderator: Rathinagiri

Post Reply
User avatar
meneale
Posts: 51
Joined: Sat Jan 12, 2013 2:05 am
Location: Campinas -SP, Brasil

Build to 64-bit

Post by meneale »

Hello HMGFORUM,

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

Thanks
AMD Phenom II X6 1090T 3.2GHz (OverClock 3.9GHz) | Windows 8.1 Pro 64-bit
4GB DDR3 | GTX 550 Ti 1GB | MSI 880GMA-E35
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Build to 64-bit

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Build to 64-bit

Post 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/
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Build to 64-bit

Post by Rathinagiri »

Now, can we use pre-compiler directives to use 32 bits or 64 bits in the same code?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Build to 64-bit

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Build to 64-bit

Post 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...
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply