Page 1 of 1

OT: recompile xharbour c-file

Posted: Fri Mar 27, 2020 12:46 pm
by Marc Vanzegbroeck
Hi,

I have an old application, using 'xHarbour Compiler build 0.99.71 (SimpLex)'

In that version, there was a problem with the function directoryrecurse.

In the newer version it was fixed. How can I compile the newer c-file (direct.c), and link to my program, using my old library?

Re: OT: recompile xharbour c-file

Posted: Sat Mar 28, 2020 9:46 am
by Marc Vanzegbroeck
The problem is that I get this error if I compile the source

Code: Select all

Error E2303 direct.c 108: Type name expected
Are there some specials flags I have to use?

Re: OT: recompile xharbour c-file

Posted: Sat Mar 28, 2020 6:00 pm
by Antonio Linares
Marc,

Please post the source code for direct.c 108

Re: OT: recompile xharbour c-file

Posted: Sat Mar 28, 2020 9:27 pm
by Marc Vanzegbroeck
Antonio,

This is line 108 in new latest release (the one with the error)

Code: Select all

static void hb_fsGrabDirectory( PHB_ITEM pDir, const char * szDirSpec, HB_FATTR uiMask, PHB_FNAME fDirSpec, BOOL bFullPath, BOOL bDirOnly )
And this one with the old source than can be compiled

Code: Select all

static void hb_fsGrabDirectory( PHB_ITEM pDir, const char * szDirSpec, USHORT uiMask, PHB_FNAME fDirSpec, BOOL bFullPath, BOOL bDirOnly )
I think the problem is that I can't mix those 2 releases, because the new one is using the variable 'HB_FATTR' that is defined in the new 'Hbdefs.h', and not in the old one.

Re: OT: recompile xharbour c-file

Posted: Sun Mar 29, 2020 6:45 am
by Antonio Linares
Marc,

Lets compare the source code for function directoryrecurse in both versions and then we fix the old one.

Please post the source code for function directoryrecurse in both versions here

Re: OT: recompile xharbour c-file

Posted: Sun Mar 29, 2020 9:34 am
by Marc Vanzegbroeck

Re: OT: recompile xharbour c-file

Posted: Sun Mar 29, 2020 11:03 am
by Antonio Linares
Marc,

You can not use this new C file with your xHarbour version, sorry.

What is the bug that you have using DirectoryRecurse() ?

Re: OT: recompile xharbour c-file

Posted: Sun Mar 29, 2020 11:09 am
by Marc Vanzegbroeck
Antonio,

The bug is that I always get an empty array.

Re: OT: recompile xharbour c-file

Posted: Sun Mar 29, 2020 2:25 pm
by Antonio Linares
Marc,

Please build FWH/samples/elixir.prg to review if it may help you

Re: OT: recompile xharbour c-file

Posted: Sun Mar 29, 2020 2:46 pm
by Marc Vanzegbroeck
Antonio,

Thank you, with the function into this example-file, I get all file files :D