Compilar letobackup no Linux
Enviado: 06 Jan 2025 14:09
Já tinha instalado todos os pacotes, esses também.
root@debian:/letodb/utils/backup# apt-get install libgpm-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libgpm-dev is already the newest version (1.20.7-10+b1).
0 upgraded, 0 newly installed, 0 to remove and 85 not upgraded.
root@debian:/letodb/utils/backup# apt-get install libgpmg1-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libgpm-dev' instead of 'libgpmg1-dev'
libgpm-dev is already the newest version (1.20.7-10+b1).
0 upgraded, 0 newly installed, 0 to remove and 85 not upgraded.
Código: Selecionar todos
sudo apt install ncurses
sudo apt install libncurses-devroot@debian:/letodb/utils/backup# apt-get install ncurses
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package ncurses
root@debian:/letodb/utils/backup# apt-get install libncurses-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libncurses-dev is already the newest version (6.4-4).
0 upgraded, 0 newly installed, 0 to remove and 85 not upgraded.
root@debian:/letodb/utils/backup# sh compila.sh
hbmk2 -L/hb32/lib/linux/gcc letobackup.hbp
Error F0035 Bad command-line parameter '--without-gpm'
hbmk2[letobackup]: Error: Running Harbour compiler (built-in). 1
(/usr/local/bin/harbour) -n2 letobackup.prg ../../source/common/common.prg -b -n -w3 -q0 -es0 -DHBMK_HAS_LETODB=1 --without-gpm -o/tmp/hbmk_8hk4w0.dir/ -i/usr/local/include/harbour -i../../include -u+../../include/rddleto.ch -u+../../include/leto_std.ch
Código: Selecionar todos
sudo apt -y install ncurses-baseOu tente com gttrm para ver se vai.hbmk2 letobackup.hbp -b -gtcrs -rebuild -info
Código: Selecionar todos
hbmk2 letobackup.hbp -b -gttrm -rebuild -info É simples: Linux tem problema de atualização, não é só Windows.Itamar M. Lins Jr. escreveu:Essas msg do José Quintas, não sei o que a ver com o tópico em questão...
Pois é....Itamar M. Lins Jr. escreveu:Caso nada funcione, se for possível, melhor instalar o Ubuntu mais novo.
Não é a mesma que ele está usando... Vc não sabe fica na sua.Pois é....
Se a atualização não funcionar, instalar um mais novo que atualize direito kkkkk
Pq vc não sabe responder, agora que já está quase resolvido...Ou pergunte no harbour-users que vai ter resposta mais confiável.
Código: Selecionar todos
#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
Recomendo ler o MANUAL.Recomenda algum livro bom de C?
# Welcome to LetoDBf
Contents
--------
0. tl;dr
1. Directory structure
2. Building binaries
2.1 via hbmk2
2.2 Borland Win32 C compiler
2.3 MS Visual C compiler
2.4 Old Harbour 3.0
2.5 xHarbour
2.6 C-API library
3. Running and stopping server
3.1 the classic way for all OS
3.2 Run as Windows service
4. Server configuration
4.1 letodb.ini
4.2 Different Server setups
4.3 Authentication
4.4 Samba file service
4.5 Security
5. How to work with the letodb server
5.1 Connecting to the server from client programs
5.2 Filters and Relations
5.3 Database driver
5.4 Special Data Files in RAM
6. Variables management
7. Functions list
7.1 Connection management functions
7.2 Transaction functions
7.3 Additional functions for current workarea
7.4 Additional rdd functions
7.5 Setting client paramenter
7.6 File functions
7.7 Management functions
7.8 User account management functions
7.9 Server variable management functions
7.10 Calling udf-functions on the server
7.11 Functions for bitmap filters
8. Utils
8.1 Server Management utility
8.2 Uhura
9. Server-side functions
10 Abbreviations and remarks
11 Trouble-Shooting
A. Internals
Código: Selecionar todos
4.2.1 UDF support
Aside calling single Harbour command with leto_UDF( "cCommand"[, xParam] ),
you can load your own PRG-level functions with a <HRB> file also during the server is running.
A very basic example is found in: tests/letoudf.prg.
How to compile a PRG to a HRB, look into letoudf.hbp. This is called with: hbmk2 letoudf.
Place the resulting <HRB> file in same directory as the server executable.
After the "reload" command or together with server start you have an entry in letodbf.log if they
were successful loaded. In case of error you shell also find a short text what have failed.
See further at Leto_Udf() ...