32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Jimmy » Tue Nov 15, 2022 6:07 am

hi,

i have "split" my CODE and use *.MAK under BCC7 32 Bit

Question : how under MSVC 64 Bit :?:
Code: Select all  Expand view
if not exist obj md obj
c:\bcc7\bin\make -fTGRID.mak

Code: Select all  Expand view
HBDIR=c:\harbour
BCDIR=c:\BCC7
FWDIR=c:\fwh

#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 =        \
TGRID.PRG    \
EXPCLASS.PRG    \
HB_FUNC.PRG

PROJECT    : DUALEXP.exe

DUALEXP.exe  : $(PRG:.PRG=.OBJ) DUALEXP.res
   echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo obj\TGRID.obj obj\EXPCLASS.obj obj\HB_FUNC.obj, + >> b32.bc
   echo DUALEXP.exe, + >> b32.bc
   echo DUALEXP.map, + >> b32.bc
   echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbrtl.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbvm.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hblang.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbmacro.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbrdd.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddntx.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddfpt.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbdebug.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcommon.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbpp.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbwin.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcpage.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbct.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbpcre.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcplr.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\xhb.lib + >> b32.bc
   
   echo $(HBDIR)\lib\win\bcc\hbziparc.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbmzip.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbzlib.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\minizip.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\png.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbusrrdd.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbtip.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbzebra.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcurl.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\libcurl.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbxpp.lib +  >> b32.bc

   echo $(FWDIR)\lib\dolphin.lib +  >> b32.bc
   
   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\uuid.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib +  >> b32.bc
   echo $(BCDIR)\lib\psdk\gdiplus.lib +  >> b32.bc
   echo $(BCDIR)\lib\import32.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\psapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\shell32.lib,  >> b32.bc

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

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /L /N /W /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

DUALEXP.res : DUALEXP.rc
  $(BCDIR)\bin\brc32.exe -r DUALEXP.rc
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Antonio Linares » Tue Nov 15, 2022 6:40 am

Dear Jimmy,

Please review FWH\samples\buildh64.bat and adapt your make file to it.

Please review FWH\makes\hbmk2.zip as hbmk2 is the easiest way to build Harbour + FWH apps
regards, saludos

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

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Jimmy » Tue Nov 15, 2022 10:46 am

hi Antonio.
Please review FWH\makes\hbmk2.zip as hbmk2 is the easiest way to build Harbour + FWH apps

thx for Answer

i have not found hbmk2.zip ... :(
c:\fwh64\makes\bormake.zip
c:\fwh64\makes\gccmake.zip
c:\fwh64\makes\ide_msvc2012.zip
c:\fwh64\makes\msmake.zip
c:\fwh64\makes\vs2010_make.zip

as also Everything does not found hbmk2.zip it is not on my PC


Please review FWH\samples\buildh64.bat and adapt your make file to it.

ok ... but how to "call" it later when have all those "echo" in new *.MAK (?)

should i use vs2010_make.zip :?:
Code: Select all  Expand view
c:\"Program Files (x86)\Microsoft Visual Studio 10.0"\VC\bin\nmake -ftest.mak
if errorlevel==0 one.exe

seem to be for 32 Bit

---

buildh64.bat seems for single File only :?:

when try
Code: Select all  Expand view
buildh64.bat A B C

it does create A.c B.c and C.c but does not link B.c and C.c so i get "missing"

sorry for all those Question but as Newbie i have to learn it ...
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Antonio Linares » Tue Nov 15, 2022 4:17 pm

regards, saludos

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

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Jimmy » Wed Nov 16, 2022 5:47 am

hi Antonio,

thx for link

have download it and use go64.bat
Code: Select all  Expand view
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour\bin\hbmk2 test64.hbp -comp=msvc64
test.exe

-Ic:\fwh\include
-Lc:\fwh\lib

which i modify to my Path thi Way
Code: Select all  Expand view
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour64\bin\hbmk2 test64.hbp -comp=msvc64
test.exe

-Ic:\fwh64\include
-Lc:\fwh64\lib

but when run go64 i got this
c:\fwh64\0\TGRID>go64

c:\fwh64\0\TGRID>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.2.6
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Error BASE/1126 Argument error: STRTRAN (Quit)
Error BASE/1126 Argument error: STRTRAN
Called from STRTRAN(0)
Called from __HBMK(0)
Called from HBMK_LOCAL_ENTRY(0)
Called from __HBMK_FAKE_ENTRY(0) Der Befehl "test.exe" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

where does STRTRAN() came from :shock:

but it work when use
Code: Select all  Expand view
c:\fwh64\samples\buildh64.bat TEST


---

test again with BCC7 64 Bit and MAKE.EXE from 32 Bit BCC

c:\fwh64\0\TGRID>go

c:\fwh64\0\TGRID>if not exist obj md obj
c:\fwh64\0\TGRID>c:\bcc7\bin\make -fTGRID.m
MAKE Version 5.2 Copyright (c) 1987, 2000
c:\harbour64\bin\harbour .\DUALGRID
Harbour 3.4.0dev (8eeef91) (2021-09-26 11:2
Copyright (c) 1999-2021, https://github.com
Compiling '.\DUALGRID.PRG'...
Lines 11471, Functions/Procedures 67
Generating C source output to 'obj\DUALGRID
c:\BCC7\bin\bcc64 -c -tWM -Ic:\harb
Embarcadero C++ 7.10 for Win64 Copyright (c
obj\DUALGRID.c:
In file included from obj\DUALGRID.c:3:
In file included from c:\harbour64\include\
c:\harbour64\include/hbdefs.h:50:10: fatal
#include <stdarg.h>
^
1 error generated.

** error 1 ** deleting .\obj\DUALGRID.OBJ
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Antonio Linares » Wed Nov 16, 2022 7:30 am

Dear Jimmy,

Please send me your files and I will build the makefile for you
regards, saludos

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

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Antonio Linares » Wed Nov 16, 2022 11:21 am

Dear Jimmy,

Here you have it:

go.bat
Code: Select all  Expand view
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
c:\harbour\bin\win\msvc\hbmk2 dualgrid.hbp -comp=msvc


dualgrid.hbp
Code: Select all  Expand view
-gui

-Ic:\fwh\include

dualgrid.prg
hb_func.prg
tgrid.prg

-Lc:\fwh\lib

-lFiveH32
-lFiveHC32

-lgdiplus
-lole32
-lOleDlg
-lversion

xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc

-ldflag=/NODEFAULTLIB:msvcrt

dualgrid.rc
 


It looks like the Total Commander! excellent work Jimmy :-)
regards, saludos

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

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Enrico Maria Giordano » Wed Nov 16, 2022 11:32 am

Antonio Linares wrote:-ldflag=/NODEFAULTLIB:msvcrt


I recommend to use -MD compiler switch and replace the above with

Code: Select all  Expand view
-nodefaultlib:libcmt
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Jimmy » Wed Nov 16, 2022 4:24 pm

hi Antonio,
Antonio Linares wrote:Here you have it:

thx for Link File and Help

as i like to use it for 64 Bit i have change
x86 -> amd64
c:\fwh\ -> c:\fwh64\
-lFiveH64 -lFiveHC64
... but fail :(
Code: Select all  Expand view
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour64\bin\win\msvc\hbmk2 dualgrid.hbp -comp=msvc

Code: Select all  Expand view
   -gui

    -Ic:\fwh64\include

    dualgrid.prg
    hb_func.prg
    tgrid.prg

    -Lc:\fwh64\lib

    -lFiveH64
    -lFiveHC64

    -lgdiplus
    -lole32
    -lOleDlg
    -lversion

    xhb.hbc
    hbct.hbc
    hbwin.hbc
    hbmzip.hbc
    hbziparc.hbc
    hbfoxpro.hbc

    -ldflag=/NODEFAULTLIB:msvcrt

    dualgrid.rc

it produce a lot of Error (about LIBs ?) ... what do i need "more" for 64 Bit :?:

Antonio Linares wrote:It looks like the Total Commander!

YES, Design is like Total Commander and also Hot-Key "should" be the same
ShFileOperation work so you can "copy" or "move" Files/Folder with Animation
"delete" does work but not "move to Paperbin" (FOF_ALLOWUNDO) ... something have change with Rights ...

i have "split" CODE while i want to "share CLASS TGRID" to Fivewin
but still need some Time to learn Fivewin and work on Demo
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Enrico Maria Giordano » Wed Nov 16, 2022 5:43 pm

Jimmy wrote:ShFileOperation work so you can "copy" or "move" Files/Folder with Animation
"delete" does work but not "move to Paperbin" (FOF_ALLOWUNDO) ... something have change with Rights ...


Interesting. Can you show a sample of ShFileOperation usage?
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Antonio Linares » Thu Nov 17, 2022 6:36 am

Jimmy,

> it produce a lot of Error (about LIBs ?) ... what do i need "more" for 64 Bit :?:

What errors ? Please post them here
regards, saludos

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

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Jimmy » Thu Nov 17, 2022 7:56 am

hi Antonio
Antonio Linares wrote:> it produce a lot of Error (about LIBs ?) ... what do i need "more" for 64 Bit :?:
What errors ? Please post them here

please use Go64 and *.HBP which i have posted

i have change "your" Go a and HBP to use for 64 Bit ... but i got a very long list so i have not post it
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Jimmy » Thu Nov 17, 2022 7:57 am

hi Enrico,
Enrico Maria Giordano wrote:Interesting. Can you show a sample of ShFileOperation usage?

have update this Thread
https://forums.fivetechsupport.com/viewtopic.php?f=3&t=42417&p=255468
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Antonio Linares » Thu Nov 17, 2022 8:03 am

Dear Jimmy,

I just ported the make to 64 bits and worked fine on first try:

go.bat
Code: Select all  Expand view
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour\bin\win\msvc64\hbmk2 dualgrid.hbp -comp=msvc64


dualgrid.hbp
Code: Select all  Expand view
-gui

-Ic:\fwh\include

dualgrid.prg
hb_func.prg
tgrid.prg

-Lc:\fwh\lib

-lFiveH64
-lFiveHC64

-lgdiplus
-lole32
-lOleDlg
-lversion

xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc

-ldflag=/NODEFAULTLIB:msvcrt

dualgrid.rc
 
regards, saludos

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

Re: 32 Bit BCC7 *.MAK -> MSVC 64 Bit ?

Postby Jimmy » Thu Nov 17, 2022 8:53 am

hi Antonio,
Antonio Linares wrote:I just ported the make to 64 bits and worked fine on first try:

YES :D
now it work using MSVC 64 Bit, thx
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 53 guests