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 » Mon Mar 17, 2014 2:49 am

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: 5161
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 127 times
Been thanked: 129 times
Contact:

Post by Rathinagiri » Mon Mar 17, 2014 8:02 am

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: 1944
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 30 times
Been thanked: 117 times
Contact:

Post by srvet_claudio » Fri Mar 28, 2014 1:52 am

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: 5161
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 127 times
Been thanked: 129 times
Contact:

Post by Rathinagiri » Fri Mar 28, 2014 4:02 am

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: 1944
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 30 times
Been thanked: 117 times
Contact:

Post by srvet_claudio » Fri Mar 28, 2014 12:46 pm

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: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Fri Mar 28, 2014 1:41 pm

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