Page 4 of 4

Re: hb_base64 link

PostPosted: Sun Sep 11, 2022 2:08 pm
by Enrico Maria Giordano
Antonio Linares wrote:Dear Enrico,

We have the problem that xHarbour provides a LoadLibrary() and FreeLibrary() from rtl.lib and Harbour does not

How to solve this ? :-)


How did you solve it with BCC? I think you must do the same, or am I missing something?

Re: hb_base64 link

PostPosted: Sun Sep 11, 2022 3:06 pm
by Enrico Maria Giordano
Talking about xHarbour, we just need a recompiled FWH lib with PRGs (you can call it fivehx32.lib, if you like this name). There is no need for a new fivehc32.lib, it is fine for xHarbour too.

Re: hb_base64 link

PostPosted: Sun Sep 11, 2022 3:15 pm
by Enrico Maria Giordano
In harbour.prg there is this function only for xHarbour:

Code: Select all  Expand view
int _snprintf( char * s, size_t n, const char * format, ... )
{
   return hb_snprintf( s, n, format );
}


What is it for? It cannot be compiled with MSC2022:

Code: Select all  Expand view
harbour.prg(383): error C2084: function 'int _snprintf(char *const ,const size_t,const char *const ,...)' already has a body
e:\fw\temp\msc\include\ucrt\stdio.h(1939): note: see previous definition of '_snprintf'


Can you remove it?

Re: hb_base64 link

PostPosted: Sun Sep 11, 2022 11:04 pm
by Antonio Linares
Enrico Maria Giordano wrote:
Antonio Linares wrote:Dear Enrico,

We have the problem that xHarbour provides a LoadLibrary() and FreeLibrary() from rtl.lib and Harbour does not

How to solve this ? :-)


How did you solve it with BCC? I think you must do the same, or am I missing something?


Dear Enrico,

The C compiler is not the issue. Harbour does not provide those functions, so FWH provides them.

But xHarbour provides them and then we have duplicates in FWH.

I guess we should move them into a PRG and don't include such PRG in FWH for xHarbour... but we use the same prgs.txt for all the makes...

Re: hb_base64 link

PostPosted: Sun Sep 11, 2022 11:44 pm
by carlos vargas
Antonio, estas funciones LoadLibrary(), FreeLibrary(), DllCall/CallDll o de llamadas similares a funciones de dll (ahorta no recuerdo bien los nombres), al estar en xharbour y fwh complican la cosa!
ya hace tiempo vi esto, y no logre encontrar una solución. :-(
unas retorna un puntero y otras numericos long. en fin complejo el asunto.

Re: hb_base64 link

PostPosted: Mon Sep 12, 2022 3:28 am
by Giovany Vecchi
Try putting these parameters:

/FORCE:MULTIPLE
SET HB_USER_LDFLAGS= /NODEFAULTLIB:msvcrt /MACHINE:X86 /nologo /subsystem:windows /INCREMENTAL:NO /ignore:4006 /MANIFEST:NO /FORCE:MULTIPLE

Re: hb_base64 link

PostPosted: Mon Sep 12, 2022 6:51 am
by Antonio Linares
Dear Giovany,

We don't want to use /FORCE:MULTIPLE

thanks for the tip

Re: hb_base64 link

PostPosted: Mon Sep 12, 2022 7:40 am
by Enrico Maria Giordano
Antonio Linares wrote:
Enrico Maria Giordano wrote:
Antonio Linares wrote:Dear Enrico,

We have the problem that xHarbour provides a LoadLibrary() and FreeLibrary() from rtl.lib and Harbour does not

How to solve this ? :-)


How did you solve it with BCC? I think you must do the same, or am I missing something?


Dear Enrico,

The C compiler is not the issue. Harbour does not provide those functions, so FWH provides them.

But xHarbour provides them and then we have duplicates in FWH.

I guess we should move them into a PRG and don't include such PRG in FWH for xHarbour... but we use the same prgs.txt for all the makes...


You successfully built FWH for xHarbour and BCC, right? And it has no problem with LoadLibrary() and FreeLibrary. So why the same libs for MSC should have any problems?

Anyway, (maybe there is something that I am missing) you can solve the problem with #ifdef __XHARBOUR__, can't you?

Re: hb_base64 link

PostPosted: Mon Sep 12, 2022 7:41 am
by Enrico Maria Giordano
Please read the message about _snprintf(), please.

Re: hb_base64 link

PostPosted: Mon Sep 12, 2022 8:11 am
by Antonio Linares
Enrico Maria Giordano wrote:Please read the message about _snprintf(), please.


Dear Enrico,

I already fixed it avoiding to include it when compiling with MSVC

thank you

Re: hb_base64 link

PostPosted: Mon Sep 12, 2022 8:13 am
by Antonio Linares
Dear Enrico,

> you can solve the problem with #ifdef __XHARBOUR__, can't you?

going to check if we can wrap a pragma BEGINDUMP ENDDUMP using it

Re: hb_base64 link

PostPosted: Mon Sep 12, 2022 8:17 am
by Enrico Maria Giordano
Antonio Linares wrote:
Enrico Maria Giordano wrote:Please read the message about _snprintf(), please.


Dear Enrico,

I already fixed it avoiding to include it when compiling with MSVC

thank you


Great, thank you! :-)

Re: hb_base64 link

PostPosted: Mon Sep 12, 2022 8:18 am
by Enrico Maria Giordano
Antonio Linares wrote:Dear Enrico,

> you can solve the problem with #ifdef __XHARBOUR__, can't you?

going to check if we can wrap a pragma BEGINDUMP ENDDUMP using it


I dont know...