FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour link problem with fivewin 25.01 64 bit and VS2022
Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Re: link problem with fivewin 25.01 64 bit and VS2022
Posted: Thu Mar 27, 2025 08:16 AM

How can I modify buildh64.bat to compile 3 files at once?

have you an example?

thanks

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: link problem with fivewin 25.01 64 bit and VS2022
Posted: Thu Mar 27, 2025 08:20 AM

You have a working example at FWH\makes\hbmk2.zip:

go64.bat and test64.hbp

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Re: link problem with fivewin 25.01 64 bit and VS2022
Posted: Thu Mar 27, 2025 10:02 AM

thanks Antonio per the working example hbmk2.zip

but i have substitute %1 with @FileComp.txt for harobur compilation in buildh64.bat

%hdir%\bin\win\msvc64\harbour @FileComp.txt /n /i%fwdir%\include;%hdir%\include /w /p /d__64__ %2 %3 > comp.log 2> warnings.log

and i obtain 3 .c files.

I have modify cl.exe inserting the 3 files .c instead of %1.c

cl -TC -W3 -O2 -c -I%hdir%\include -D_WIN64 -D__FLAT__ -I%fwdir%\include -I-I"%ProgramFiles(x86)%\Windows Kits"\10\Include\10.0.18362.0\ucrt scuola.c functscl.c TcBrowse.c

i have modify: echo %1.obj > msvc.tmp with echo scuola.obj functscl.obj TcBrowse.obj > msvc.tmp

and now it generate a msvc.tmp file with 3 obj file and the necessary lib files.

now i have new problem:

some functions called from scuola.prg but residents in funcscl.prg give this errors:

scuola.c

functscl.c

TcBrowse.c

Generazione del codice in corso...

functscl.obj : error LNK2005: HB_FUN_LGETPASSWORD just defined in scuola.obj

functscl.obj : error LNK2005: HB_FUN_MOVE_FILE già definito in scuola.obj

TcBrowse.obj : error LNK2005: HB_FUN_TCBROWSE già definito in scuola.obj

ecc

scuola.exe : fatal error LNK1169: rilevato uno o più simboli definiti più volte

  • Linking errors *

is there a flag to put to avoid this errors?

thanks

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: link problem with fivewin 25.01 64 bit and VS2022
Posted: Thu Mar 27, 2025 12:54 PM

Use this linker flag:

/force:multiple

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Re: link problem with fivewin 25.01 64 bit and VS2022
Posted: Thu Mar 27, 2025 01:14 PM

Many thanks Antonio,

now all works fine!

i have also correct this string for harbor compile with 3 files:

%hdir%\bin\win\msvc64\harbour scuola functscl TcBrowse /n /i%fwdir%\include;%hdir%\include /p /d__64__ %2 %3 > comp.log 2> warnings.log

thanks to all.

Marzio

Continue the discussion