Converting my application from 32-bit to 64-bit

Converting my application from 32-bit to 64-bit

Postby driessen » Wed Nov 22, 2017 2:23 pm

Hello,

I want to convert my application from 32-bit to 64-bit.

Here is my MAK-file which I use for 32-bit.
Code: Select all  Expand view
#Borland make sample, (c) FiveTech Software 2005-2009

HBDIR=c:\software\harbour
BCDIR=c:\progra~1\borland\bcc7
FWDIR=c:\software\fwharb

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\
.path.RC  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG =        \
BEHAGEN1.PRG \
BEHAGEN2.PRG \
BEHBOEK1.PRG \
BEHBOEK2.PRG \
BEHDOSS1.PRG \
BEHDOSS2.PRG \
BEHINTRX.PRG \
BEHPAAND.PRG \
BEHPARAM.PRG \
BEHPRARC.PRG \
BEHSOOR1.PRG \
BEHSOOR2.PRG \
BEHUSER.PRG  \
DOCWP1.PRG   \
DOCWP2.PRG   \
FGEGTL1.PRG  \
FGEGTL2.PRG  \
JUDA.PRG     \
MAKEIND.PRG  \
RAPAGPRE.PRG \
RAPDOSBH.PRG \
TINATIVO.PRG \
Z-ERROR1.PRG \
Z-RPREV.PRG  \
Z-TGET.PRG   \
Z-WBROWS.PRG

C =        \
BEHAGEN1.C \
BEHAGEN2.C \
BEHBOEK1.C \
BEHBOEK2.C \
BEHDOSS1.C \
BEHDOSS2.C \
BEHINTRX.C \
BEHPAAND.C \
BEHPARAM.C \
BEHPRARC.C \
BEHSOOR1.C \
BEHSOOR2.C \
BEHUSER.C  \
DOCWP1.C   \
DOCWP2.C   \
FGEGTL1.C  \
FGEGTL2.C  \
JUDA.C     \
MAKEIND.C  \
RAPAGPRE.C \
RAPDOSBH.C \
TINATIVO.C \
Z-ERROR1.C \
Z-RPREV.C  \
Z-TGET.C   \
Z-WBROWS.C

OBJ = $(PRGS:.PRG=.\OBJ)
OBJS = $(OBJ:.\=.\obj\)

PROJECT    : JUDA_2.EXE

#RES-file wordt door COMPRES.BAT aangemaakt
#JUDA_2.EXE  : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) JUDA.RES
JUDA_2.EXE  : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ)
   echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
#  echo $(OBJS), + >> b32.bc
   echo OBJ\BEHAGEN1.OBJ + >> b32.bc
   echo OBJ\BEHAGEN2.OBJ + >> b32.bc
   echo OBJ\BEHBOEK1.OBJ + >> b32.bc
   echo OBJ\BEHBOEK2.OBJ + >> b32.bc
   echo OBJ\BEHDOSS1.OBJ + >> b32.bc
   echo OBJ\BEHDOSS2.OBJ + >> b32.bc
   echo OBJ\BEHINTRX.OBJ + >> b32.bc
   echo OBJ\BEHPAAND.OBJ + >> b32.bc
   echo OBJ\BEHPARAM.OBJ + >> b32.bc
   echo OBJ\BEHPRARC.OBJ + >> b32.bc
   echo OBJ\BEHSOOR1.OBJ + >> b32.bc
   echo OBJ\BEHSOOR2.OBJ + >> b32.bc
   echo OBJ\BEHUSER.OBJ + >> b32.bc
   echo OBJ\DOCWP1.OBJ + >> b32.bc
   echo OBJ\DOCWP2.OBJ + >> b32.bc
   echo OBJ\FGEGTL1.OBJ + >> b32.bc
   echo OBJ\FGEGTL2.OBJ + >> b32.bc
   echo OBJ\JUDA.OBJ + >> b32.bc
   echo OBJ\MAKEIND.OBJ + >> b32.bc
   echo OBJ\RAPAGPRE.OBJ + >> b32.bc
   echo OBJ\RAPDOSBH.OBJ + >> b32.bc
   echo OBJ\TINATIVO.OBJ + >> b32.bc
   echo OBJ\Z-ERROR1.OBJ + >> b32.bc
   echo OBJ\Z-RPREV.OBJ + >> b32.bc
   echo OBJ\Z-TGET.OBJ + >> b32.bc
   echo OBJ\Z-WBROWS.OBJ, + >> b32.bc
 
   echo JUDA_2.EXE, + >> b32.bc
   echo JUDA_2.MAP, + >> b32.bc
   echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
   echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\hblang.lib + >> b32.bc
   echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
   echo $(HBDIR)\lib\rddntx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddfpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
   echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
   echo $(HBDIR)\lib\hbwin.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcpage.lib + >> b32.bc
   echo $(HBDIR)\lib\hbct.lib + >> b32.bc
   echo $(HBDIR)\lib\png.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcplr.lib + >> b32.bc
   echo $(HBDIR)\lib\xhb.lib + >> b32.bc
   echo $(HBDIR)\lib\hbtip.lib + >> b32.bc
   echo $(HBDIR)\lib\hbzlib.lib + >> b32.bc
   echo $(HBDIR)\lib\hbmzip.lib + >> b32.bc
   echo $(HBDIR)\lib\hbziparc.lib + >> b32.bc
   echo $(HBDIR)\lib\minizip.lib + >> b32.bc
   echo $(HBDIR)\lib\hbpcre.lib + >> b32.bc

   rem Uncomment these two lines to use Advantage RDD
   rem echo $(HBDIR)\lib\rddads.lib + >> b32.bc
   rem echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\uuid.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc
   echo $(BCDIR)\lib\wininet.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc

   IF EXIST ..\RES\JUDA.RES echo ..\RES\JUDA.RES >> b32.bc
   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /N /W0 /V /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

#RES-file build by COMPRES.BAT
#JUDA.RES : ..\RES\JUDA.RC
#  $(BCDIR)\bin\brc32.exe -r ..\RES\JUDA.RC
 
Which changes do I have to make to convert to 64-bit?

Thanks a lot in advance for any help.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Converting my application from 32-bit to 64-bit

Postby TimStone » Wed Nov 22, 2017 7:34 pm

I did this about a year ago, but elected not to then use it.

First, you need the 64 bit versions of Harbour and FWH.

The big stumbling point is that you also need the 64bit version of all 3rd party libraries you might use. I had most, but the problem was my spell checker. The company now has a 64 bit build, with absolutely no other changes, and wanted a ridiculously high price to do the update.

Many people cautioned here that a 64 bit version was not necessarily an advantage. In fact, it is interesting that Microsoft still suggests using the 32 bit version of Office 365 in most installs.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Converting my application from 32-bit to 64-bit

Postby Antonio Linares » Thu Nov 23, 2017 6:53 am

Michel,

Here you have the Borland makefile for Harbour 64 and FWH 64:

go64.bat
Code: Select all  Expand view
@set oldpath=%path%
@set oldlib=%lib%

@if exist C:\bcc7164  set path=C:\bcc7164\bin
@if exist c:\fwh    set FWDIR=c:\fwh

@if not exist obj md obj

@if exist c:\fwh @c:\bcc7\bin\make -fone64.mak FWH=c:\fwh BCDIR=c:\bcc7164

@if errorlevel=0 one64

@set path=%oldpath%
@set lib=%oldlib%
@set oldpath=""
@set oldlib=""

one64.mak
Code: Select all  Expand view
HBDIR=c:\harbour
BCDIR=c:\bcc7164
FWDIR=c:\fwh

.path.obj = .\obj64
.path.prg = .\
.path.ch  = $(FWDIR)\include;$(HBDIR)\include
.path.c   = .\
.path.rc  = .\

PRG = \
.\one.prg \
.\two.prg \
.\three.prg

OBJ=$(PRG:.prg=.obj)
OBJS=$(OBJ:.\=.\obj\)

PROJECT : one64.exe

one64.exe : $(OBJS) one64.res
   echo off
   echo $(BCDIR)\lib\c0x64.o + > b64.bc  
   echo $(OBJS), + >> b64.bc
   echo one64.exe, + >> b64.bc
   echo one64.map, + >> b64.bc
   echo $(FWDIR)\lib\Five64.a $(FWDIR)\lib\FiveC64.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbrtl.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbvm.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\gtgui.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hblang.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbmacro.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbrdd.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\rddntx.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\rddcdx.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\rddfpt.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbsix.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbdebug.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbcommon.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbpp.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbwin.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbcpage.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbct.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbcplr.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\xhb.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\png.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbzlib.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbziparc.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbmzip.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\minizip.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbpcre.a + >> b64.bc

   echo $(BCDIR)\lib\cw64.a + >> b64.bc
   echo $(BCDIR)\lib\import64.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\odbc32.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\nddeapi.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\msimg32.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\shell32.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\gdiplus.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\rasapi32.a, >> b64.bc

   echo one64.res >> b64.bc
   $(BCDIR)\bin\ilink64 -Gn -aa -Tpe -s @b64.bc
   del b64.bc

.prg.obj:
  $(HBDIR)\bin\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include >> comp.log
  $(BCDIR)\bin\bcc64 -c -tWM -I$(HBDIR)\include -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$&.obj obj\$&.c

.c.obj:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl >> tmp
  $(BCDIR)\bin\bcc64 -oobj\$&.obj @tmp $&.c
  del tmp

one64.res : one64.rc
  if exist c:\bcc7164 $(BCDIR)\bin\brc32.exe -r -Ic:\bcc7164\include\windows\sdk one64.rc
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Converting my application from 32-bit to 64-bit

Postby Marc Venken » Thu Nov 23, 2017 4:25 pm

Hey Michel,

Ik zie dat je een aantal extra prg's in je files hebt opgenomen, zoals

Z-ERROR1.PRG \
Z-RPREV.PRG \
Z-TGET.PRG \
Z-WBROWS.PRG

Zijn dit speciaal aangepaste versies ? en vooral die WBrows tov Xbrowse

Marc

(I ask Michel why he is using these files)
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1431
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Converting my application from 32-bit to 64-bit

Postby richard-service » Thu Nov 23, 2017 6:11 pm

Antonio Linares wrote:Michel,

Here you have the Borland makefile for Harbour 64 and FWH 64:

go64.bat
Code: Select all  Expand view
@set oldpath=%path%
@set oldlib=%lib%

@if exist C:\bcc7164  set path=C:\bcc7164\bin
@if exist c:\fwh    set FWDIR=c:\fwh

@if not exist obj md obj

@if exist c:\fwh @c:\bcc7\bin\make -fone64.mak FWH=c:\fwh BCDIR=c:\bcc7164

@if errorlevel=0 one64

@set path=%oldpath%
@set lib=%oldlib%
@set oldpath=""
@set oldlib=""

one64.mak
Code: Select all  Expand view
HBDIR=c:\harbour
BCDIR=c:\bcc7164
FWDIR=c:\fwh

.path.obj = .\obj64
.path.prg = .\
.path.ch  = $(FWDIR)\include;$(HBDIR)\include
.path.c   = .\
.path.rc  = .\

PRG = \
.\one.prg \
.\two.prg \
.\three.prg

OBJ=$(PRG:.prg=.obj)
OBJS=$(OBJ:.\=.\obj\)

PROJECT : one64.exe

one64.exe : $(OBJS) one64.res
   echo off
   echo $(BCDIR)\lib\c0x64.o + > b64.bc  
   echo $(OBJS), + >> b64.bc
   echo one64.exe, + >> b64.bc
   echo one64.map, + >> b64.bc
   echo $(FWDIR)\lib\Five64.a $(FWDIR)\lib\FiveC64.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbrtl.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbvm.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\gtgui.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hblang.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbmacro.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbrdd.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\rddntx.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\rddcdx.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\rddfpt.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbsix.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbdebug.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbcommon.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbpp.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbwin.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbcpage.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbct.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbcplr.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\xhb.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\png.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbzlib.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbziparc.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbmzip.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\minizip.a + >> b64.bc
   echo $(HBDIR)\lib\bcc64\hbpcre.a + >> b64.bc

   echo $(BCDIR)\lib\cw64.a + >> b64.bc
   echo $(BCDIR)\lib\import64.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\odbc32.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\nddeapi.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\msimg32.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\shell32.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\gdiplus.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\rasapi32.a, >> b64.bc

   echo one64.res >> b64.bc
   $(BCDIR)\bin\ilink64 -Gn -aa -Tpe -s @b64.bc
   del b64.bc

.prg.obj:
  $(HBDIR)\bin\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include >> comp.log
  $(BCDIR)\bin\bcc64 -c -tWM -I$(HBDIR)\include -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$&.obj obj\$&.c

.c.obj:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl >> tmp
  $(BCDIR)\bin\bcc64 -oobj\$&.obj @tmp $&.c
  del tmp

one64.res : one64.rc
  if exist c:\bcc7164 $(BCDIR)\bin\brc32.exe -r -Ic:\bcc7164\include\windows\sdk one64.rc
 


Hi Antonio,

How to make 64bit Lib( .a ) for bcc64? any make file sample welcome.
Thanks a lot.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: Converting my application from 32-bit to 64-bit

Postby driessen » Thu Nov 23, 2017 10:29 pm

Hello everyone,

Thanks a lot for your help.
I'll be trying out your suggestions.


To Marc,

Marc, het betreft slechts enkele kleine aanpassingen, vooral te maken met kleurinstellingen en/of vertalingen naar het Nederlands.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Converting my application from 32-bit to 64-bit

Postby Antonio Linares » Fri Nov 24, 2017 3:27 pm

Richard,

same as way as we do with tlib.exe in 32 bits:

tlib64 mylib.a + module.obj
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Converting my application from 32-bit to 64-bit

Postby richard-service » Fri Nov 24, 2017 4:24 pm

Antonio Linares wrote:Richard,

same as way as we do with tlib.exe in 32 bits:

tlib64 mylib.a + module.obj


Antonio,
I see. Thanks a lot.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests