FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour hb_base64 link
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: hb_base64 link
Posted: Sun Sep 11, 2022 02:08 PM
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?
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: hb_base64 link
Posted: Sun Sep 11, 2022 03:06 PM

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.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: hb_base64 link
Posted: Sun Sep 11, 2022 03:15 PM
In harbour.prg there is this function only for xHarbour:

Code (fw): Select all Collapse
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 (fw): Select all Collapse
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?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: hb_base64 link
Posted: Sun Sep 11, 2022 11:04 PM
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...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: hb_base64 link
Posted: Sun Sep 11, 2022 11:44 PM

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.

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 244
Joined: Mon Jun 05, 2006 09:39 PM
Re: hb_base64 link
Posted: Mon Sep 12, 2022 03:28 AM
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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: hb_base64 link
Posted: Mon Sep 12, 2022 06:51 AM

Dear Giovany,

We don't want to use /FORCE:MULTIPLE

thanks for the tip

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: hb_base64 link
Posted: Mon Sep 12, 2022 07:40 AM
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?
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: hb_base64 link
Posted: Mon Sep 12, 2022 07:41 AM

Please read the message about _snprintf(), please.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: hb_base64 link
Posted: Mon Sep 12, 2022 08:11 AM
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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: hb_base64 link
Posted: Mon Sep 12, 2022 08:13 AM

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: hb_base64 link
Posted: Mon Sep 12, 2022 08:17 AM
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! :-)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: hb_base64 link
Posted: Mon Sep 12, 2022 08:18 AM
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...

Continue the discussion