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

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

Postby Jimmy » Sun Sep 03, 2023 4:46 am

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
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

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

Postby nageswaragunupudi » Sun Sep 03, 2023 4:49 am

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

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

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

Postby nageswaragunupudi » Sun Sep 03, 2023 5:13 am

Or you may also await the next release of FWH
Regards

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

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

Postby cnavarro » Sun Sep 03, 2023 5:52 am

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
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

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

Postby Jimmy » Sun Sep 03, 2023 9:36 am

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
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Adolfo, Google [Bot] and 89 guests