Page 1 of 1

how to "override" Function of FiveH64.lib using MSVC

PostPosted: Sun Sep 03, 2023 4:46 am
by Jimmy
hi,

i want to "debug" some Function and use "Original Source"
that work with BCC / *.MAK but using MSVC / *.HBP i got "dupe Error :shock:
FiveH64.lib(ADOFUNCS.obj) : error LNK2005: HB_FUN_FW_RDBMSNAME ist bereits in ADO.obj definiert.
FiveH64.lib(ADOFUNCS.obj) : error LNK2005: HB_FUN_FWADOFIELDSTRUCT ist bereits in ADO.obj definiert.

how can i modify *.HBP for MSVC to "override" LIB Function :?:

using MinGW i can use --allow-multiple-definition

Re: how to "override" Function of FiveH64.lib using MSVC

PostPosted: Sun Sep 03, 2023 4:49 am
by nageswaragunupudi
Use your functions as "static function xxx" in your module.

Re: how to "override" Function of FiveH64.lib using MSVC

PostPosted: Sun Sep 03, 2023 5:13 am
by nageswaragunupudi
Or you may also await the next release of FWH

Re: how to "override" Function of FiveH64.lib using MSVC

PostPosted: Sun Sep 03, 2023 5:52 am
by cnavarro
Jimmy wrote:hi,

i want to "debug" some Function and use "Original Source"
that work with BCC / *.MAK but using MSVC / *.HBP i got "dupe Error :shock:
FiveH64.lib(ADOFUNCS.obj) : error LNK2005: HB_FUN_FW_RDBMSNAME ist bereits in ADO.obj definiert.
FiveH64.lib(ADOFUNCS.obj) : error LNK2005: HB_FUN_FWADOFIELDSTRUCT ist bereits in ADO.obj definiert.

how can i modify *.HBP for MSVC to "override" LIB Function :?:

using MinGW i can use --allow-multiple-definition


Try with flags linker: /FORCE:MULTIPLE

Re: how to "override" Function of FiveH64.lib using MSVC

PostPosted: Sun Sep 03, 2023 9:36 am
by Jimmy
hi,
cnavarro wrote:Try with flags linker: /FORCE:MULTIPLE

i have write this into hbmk.hbm
Code: Select all  Expand view
DUALGRID.HBC

-w1 -es2  -ldflag=-FORCE:MULTIPLE

and got
FiveH64.lib(ADOFUNCS.obj) : warning LNK4006: HB_FUN_FW_RDBMSNAME ist bereits in "ADO.obj" definiert; zweite Definition wird ignoriert.
FiveH64.lib(ADOFUNCS.obj) : warning LNK4006: HB_FUN_FW_OPENRECORDSET ist bereits in "ADO.obj" definiert; zweite Definition wird ignoriert.
FiveH64.lib(ADOFUNCS.obj) : warning LNK4006: HB_FUN_FWADOSTRUCT ist bereits in "ADO.obj" definiert; zweite Definition wird ignoriert.
FiveH64.lib(ADOFUNCS.obj) : warning LNK4006: HB_FUN_FWADOFIELDSTRUCT ist bereits in "ADO.obj" definiert; zweite Definition wird ignoriert.
DUALGRID.exe : warning LNK4088: Image wird aufgrund der Option /FORCE generiert; Image kann möglicherweise nicht ausgeführt werden.

but generated EXE seens to work :D