Page 2 of 2
Re: link problem with fivewin 25.01 64 bit and VS2022
Posted: Thu Mar 27, 2025 8:16 am
by marzio
How can I modify buildh64.bat to compile 3 files at once?
have you an example?
thanks
Re: link problem with fivewin 25.01 64 bit and VS2022
Posted: Thu Mar 27, 2025 8:20 am
by Antonio Linares
You have a working example at FWH\makes\hbmk2.zip:
go64.bat and test64.hbp
Re: link problem with fivewin 25.01 64 bit and VS2022
Posted: Thu Mar 27, 2025 10:02 am
by marzio
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
Re: link problem with fivewin 25.01 64 bit and VS2022
Posted: Thu Mar 27, 2025 12:54 pm
by Antonio Linares
Use this linker flag:
/force:multiple
Re: link problem with fivewin 25.01 64 bit and VS2022
Posted: Thu Mar 27, 2025 1:14 pm
by marzio
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