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

Post Reply
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

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

Post 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
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

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

Post by nageswaragunupudi »

Use your functions as "static function xxx" in your module.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

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

Post by nageswaragunupudi »

Or you may also await the next release of FWH
Regards

G. N. Rao.
Hyderabad, India
User avatar
cnavarro
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

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

Post 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
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

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

Post by Jimmy »

hi,
cnavarro wrote:Try with flags linker: /FORCE:MULTIPLE
i have write this into hbmk.hbm

Code: Select all | Expand

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
greeting,
Jimmy
Post Reply