Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unresolved external '_HB_FUN_LETO_DIRECTORY' #32

Open
Numerabilis opened this issue Jun 20, 2023 · 4 comments
Open

Error: Unresolved external '_HB_FUN_LETO_DIRECTORY' #32

Numerabilis opened this issue Jun 20, 2023 · 4 comments

Comments

@Numerabilis
Copy link

Hi, Elchs

I am trying to adapt my backup procedure with LETODBF.
I have to copy files from server to local to zip files, am I right? That´s what I understood from letobackup.prg
I got an error saying there is no LETO_DIRECTORY()

C:\BCC58\BIN\ilink32 @makefile.lnk
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_LETO_DIRECTORY' referenced from C:\PROGRAMAS\CONTROLI\OBJ\GERENTE.OBJ

***I´m using xHarbour v1.2.3 + BCC 5.8

@Numerabilis
Copy link
Author

Numerabilis commented Jan 10, 2025

LETODBF\SOURCE\CLIENT\LETOMGMN.C

#if ! defined( __XHARBOUR__ )
HB_FUNC( LETO_DIRECTORY )  /* ( cPathSpec, cnAttributes ) */
{
   LETOCONNECTION * pConnection;
   char             szFile[ HB_PATH_MAX ];
   const char *     ptr;
   unsigned long    ulLen;

   if( ( pConnection = letoParseParam( hb_parc( 1 ), szFile ) ) != NULL )
   {
      char szAttr[ 21 ] = { 0 };

      if( ! *szFile )
         strcpy( szFile, "." );
      if( HB_ISCHAR( 2 ) )
         hb_strncpy( szAttr, hb_parc( 2 ), 20 );
      else if( HB_ISNUM( 2 ) )
         hb_fsAttrDecode( ( HB_FATTR ) hb_parni( 2 ), szAttr );

      ptr = LetoDirectory( pConnection, szFile, *szAttr ? szAttr : NULL );
      if( ptr != NULL )
      {
         ptr = leto_DecryptText( pConnection, &ulLen, pConnection->szBuffer + 3 );
         if( ulLen )
         {
            hb_itemReturnRelease( hb_itemDeserialize( &ptr, ( HB_SIZE * ) &ulLen ) );
            return;
         }
      }
   }

   hb_itemReturnRelease( hb_itemArrayNew( 0 ) );
}
#endif

It means there´s no LETO_DIRECTORY() on XHARBOUR... Why?

@Numerabilis
Copy link
Author

If I comment that lines #if #endif it doesn't compile for xharbour.
I noticed that the source code for this function is on src/rtl/direct.c
I compared the source from Harbour vs xHarbour and noticed it´s pretty different. Harbour code is more simple, one small function while xHarbour has a few functions working on it.
I need this LETO_DIRECTORY() function to restore backup files. I need to read the backup folder and see the files on it.

@Numerabilis
Copy link
Author

Numerabilis commented Jan 13, 2025

Is it going to be fixed someday?

@Numerabilis
Copy link
Author

Not fixed

@Numerabilis Numerabilis reopened this Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant