FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Problema al compilar con Harbour (errsysw) [SOLUCIONADO]
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM
Problema al compilar con Harbour (errsysw) [SOLUCIONADO]
Posted: Wed May 20, 2015 12:25 PM
Estimados;
utilizo un errsysw que me cedi贸 Manuel Exp贸sito.
Ahora, pretendo incluirlo para su uso con Harbour. luego de incorporarlo a fiveh.lib (ver 12.04) y compilar me devuelve el siguiente error:
Harbour 3.2.0dev (r1406161338)
Copyright (c) 1999-2014, http://harbour-project.org/
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
9testman.c:
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_FW_GT' referenced from D:\HARBOUR\FWH\LIB\FIVEH.LIB|HARBOUR
pruDlph32.EXE - 1 error(es), 0 advertencia(s)
El errsusw que intetno usar es el siguiente:
Code (fw): Select all Collapse
// Error handler system adapted to FiveWin
// ErrSysW.prg

REQUEST HB_CODEPAGE_ESWIN

#include "error.ch"
#include "FiveWin.ch"

#define CLR_FONDO_DLG 聽 nRGB( 255, 40, 0 ) //( 231, 120, 聽23 ) Naranja mgIdeas
#define CLR_FONDO_LST 聽 nRGB( 255, 254, 203 )

external _fwGenError 聽 // Link FiveWin generic Error Objects Generator

#define NTRIM(n) 聽 聽( LTrim( Str( n ) ) )

#ifdef __CLIPPER__
聽 聽#define DLG_TITLE "FiveWin: The CA-Clipper for Windows Library"
#else
聽 聽#ifdef __HARBOUR__
聽 聽 聽 #define DLG_TITLE "Manejador de Error ~ mgIdeas 漏 2009"
聽 聽 聽 #command QUIT => ( PostQuitMessage( 0 ), __Quit() )
聽 聽#else
聽 聽 聽 #define DLG_TITLE "FiveWin for Xbase++"
聽 聽#endif
#endif

/*************
*聽 聽ErrorSys()
*
*聽 聽Note: 聽automatically executes at startup
*/
proc ErrorSys()
聽 聽 ErrorBlock( { | e | ErrorDialog( e ) } )
return

proc ErrorLink()
return


/*************
* 聽 ErrorDialog()
*/
static function ErrorDialog( e ) // -> logical or quits App.

聽 聽local oDlg, oLbx, oFont, oBmp, oBrush, oBtn1, oBtn2, oBtn3
聽 聽local lRet 聽 聽// if lRet == nil -> default action: QUIT
聽 聽local n, j, cMessage, aStack:= {}
聽 聽local oSay, hLogo
聽 聽local nButtons := 1
聽 聽local cErrorLog:= ""
聽 聽local aVersions:= GetVersion()
聽 聽local aTasks
聽 聽local aRDDs, nTarget, uValue
聽 聽local oOldError
聽 聽local cRelation

聽 聽// by default, division by zero yields zero
聽 聽if ( e:genCode == EG_ZERODIV )
聽 聽 聽 return 0
聽 聽end

聽 聽// for network open error, set NETERR() and subsystem default
聽 聽if ( e:genCode == EG_OPEN .and. ;
聽 聽 聽 ( e:osCode == 32 .or. e:osCode == 5 ) .and. ;
聽 聽 聽 聽 e:canDefault )
聽 聽 聽 NetErr( .t. )
聽 聽 聽 return .f. 聽 聽 聽 // Warning: Exiting!
聽 聽end

聽 聽// for lock error during APPEND BLANK, set NETERR() and subsystem default
聽 聽if ( e:genCode == EG_APPENDLOCK .and. e:canDefault )
聽 聽 聽 NetErr( .t. )
聽 聽 聽 return .f. 聽 聽 聽 // OJO SALIDA
聽 聽endif

聽 聽HB_SetCodePage( "ESWIN" )
聽 聽if Left( ProcName( 7 ), 10 ) == "ERRORDIALO"
聽 聽 聽 SET RESOURCES TO
聽 聽 聽 ErrorLevel( 1 )
聽 聽 聽 QUIT
聽 聽endif

聽 聽ErrorBlock( {|e| MsgStop( ErrorMessage(e) + " desde ErrorSys, linea:" + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽Str( ProcLine( 1 ), 3 ) ),__quit() } )

聽 聽cErrorLog += "Applicaci贸n" +CRLF
聽 聽cErrorLog += "___________________________________________________" +CRLF +CRLF
聽 聽cErrorLog += "Ubicaci贸n y Nombre 聽 聽 : " + GetModuleFileName( GetInstance() )
聽 聽#ifdef __CLIPPER__
聽 聽 聽 cErrorLog += " (16 bits)" +CRLF
聽 聽#else
聽 聽 聽 cErrorLog += " (32 bits)" +CRLF
聽 聽#endif
聽 聽cErrorLog += "Tama帽o de la Aplicacion: " + Transform( FSize( GetModuleFileName( GetInstance() ) ), "9,999,999 bytes" ) +CRLF +CRLF

聽 聽cErrorLog += "Estaci贸n de Trabajo: " + NetName() 聽+CRLF
聽 聽cErrorLog += "Usuario en Sesi贸n: " + NetName( 1 ) +CRLF
聽 聽#ifdef __CLIPPER__
聽 聽 聽 cErrorLog += "Max. Archivos Handles permitidos: ( SetHandleCount() ) " + Str( SetHandleCount(), 3 ) +CRLF
聽 聽#endif

聽 聽cErrorLog += "Ocurrido el: 聽 聽" + FechaErr() 聽+CRLF
聽 聽cErrorLog += "Ocurrido a las: " +Time() 聽 聽 聽 +CRLF
聽 聽TRY
聽 聽 聽 cErrorLog += "Transcurrido desde el inicio: "+ TimeFromStart() 聽+CRLF+CRLF
聽 聽CATCH
聽 聽 聽 cErrorLog += "Transcurrido desde el inicio: N/D" 聽+CRLF+CRLF
聽 聽END

聽 聽// Error object analysis
聽 聽cMessage 聽:= "Descripci贸n de Error generado: " +CRLF+ ;
聽 聽 聽 聽 聽 聽 聽 聽 "___________________________________________________"+CRLF +CRLF + ;
聽 聽 聽 聽 聽 聽 聽 聽 ErrorMessage( e ) +CRLF
聽 聽cErrorLog += cMessage

聽 聽if ValType( e:Args ) == "A"
聽 聽 聽 cErrorLog += " 聽 Args:" +CRLF
聽 聽 聽 for n:= 1 to Len( e:Args )
聽 聽 聽 聽 聽cErrorLog += " 聽 聽 [" + Str( n, 4 ) + "] = " + ValType( e:Args[ n ] ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 " 聽 " + cValToChar( e:Args[ n ] ) +CRLF
聽 聽 聽 next
聽 聽endif

聽 聽cErrorLog += CRLF+CRLF + "Llamadas al Stack:" +CRLF
聽 聽cErrorLog += "___________________________________________________" +CRLF +CRLF
聽 聽 聽 n:= 2 聽 聽// we don't disscard any info again !
聽 聽 聽 while ( n < 74 )
聽 聽 聽 聽 聽 if ! Empty(ProcName( n ) )
聽 聽 聽 聽 聽 聽 聽AAdd( aStack, "Llamado desde: 聽" +ProcFile( n ) +" " +Trim( ProcName( n ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"(" + NTRIM( ProcLine( n ) ) + ")" )
聽 聽 聽 聽 聽 聽 聽cErrorLog += ATail( aStack ) +CRLF
聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 n++
聽 聽 end

聽 聽cErrorLog += CRLF + "System" +CRLF
聽 聽cErrorLog += "======" +CRLF

聽 聽#ifdef __CLIPPER__
聽 聽 聽 cErrorLog += "CPU tipo: " + GetCPU() +CRLF
聽 聽#else
聽 聽 聽 cErrorLog += "CPU tipp: " + GetCPU() + " " + AllTrim( Str( GetCPUSpeed() ) ) + " Mhz" +CRLF
聽 聽#endif

聽 聽cErrorLog += "Memoria del Pc: " + cValToChar( Int( nExtMem() / ( 1024 * 1024 ) ) + 1 ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽" megs" +CRLF +CRLF
聽 聽cErrorLog += "Recursos del Sistema: 聽 " + AllTrim( Str( GetFreeSystemResources( 0 ) ) ) + " %" +CRLF + ;
聽 聽 聽 聽 聽 聽 聽 聽 "Recuros 聽GDI: 聽 聽 聽 聽 聽 " + AllTrim( Str( GetFreeSystemResources( 1 ) ) ) + " %" +CRLF + ;
聽 聽 聽 聽 聽 聽 聽 聽 "Recursos para Usuario: 聽" + AllTrim( Str( GetFreeSystemResources( 2 ) ) ) + " %" +CRLF +CRLF

聽 聽cErrorLog += "Versi贸n del Compilador: " + Version() +CRLF

聽 聽#ifdef __CLIPPER__
聽 聽 聽 cErrorLog += "versi贸n de Windows y MsDos: " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AllTrim( Str( aVersions[ 1 ] ) ) + "." + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AllTrim( Str( aVersions[ 2 ] ) ) + ", " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AllTrim( Str( aVersions[ 3 ] ) ) + "." + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AllTrim( Str( aVersions[ 4 ] ) ) + CRLF + CRLF
聽 聽#else
聽 聽 聽 cErrorLog += "versi贸n Windows: " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AllTrim( Str( aVersions[ 1 ] ) ) + "." + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AllTrim( Str( aVersions[ 2 ] ) ) + ", Build " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AllTrim( Str( aVersions[ 3 ] ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽" " + aVersions[ 5 ] + CRLF + CRLF
聽 聽#endif

聽 聽aTasks:= GetTasks()
聽 聽cErrorLog += "Total de aplicaciones Windows en ejecuci贸n: " + ;
聽 聽 聽 聽 聽 聽 聽 聽 AllTrim( Str( Len( aTasks ) ) ) + CRLF
聽 聽for n:= 1 to Len( aTasks )
聽 聽 聽 cErrorLog += " 聽 聽" + Str( n, 3 ) + " " + aTasks[ n ] + CRLF
聽 聽next

聽 聽// Warning!!! Keep here this code !!! Or we will be consuming GDI as
聽 聽// we don't generate the error but we were generating the bitmap

聽 聽// hLogo:= 聽FWBitMap()

聽 聽if e:canRetry
聽 聽 聽 nButtons++
聽 聽endif

聽 聽if e:canDefault
聽 聽 聽 nButtons++
聽 聽endif

聽 聽cErrorLog += CRLF+CRLF + "Variables en uso:" + CRLF + "___________________________________________________" + CRLF + CRLF
聽 聽cErrorLog += "Procedimiento Tipo 聽Valor:" + CRLF
聽 聽cErrorLog += "___________________________________________________" + CRLF + CRLF

聽 聽n := 2 聽 聽// we don't disscard any info again !
聽 聽while ( n < 74 )

聽 聽 聽 聽if ! Empty( ProcName( n ) )
聽 聽 聽 聽 聽 cErrorLog += " 聽 " + Trim( ProcName( n ) ) + CRLF
聽 聽 聽 聽 聽 for j = 1 to ParamCount( n )
聽 聽 聽 聽 聽 聽 聽cErrorLog += " 聽 聽 Param " + Str( j, 3 ) + ": 聽 聽" + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ValType( GetParam( n, j ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 " 聽 聽" + cGetInfo( GetParam( n, j ) ) + CRLF
聽 聽 聽 聽 聽 next
聽 聽 聽 聽 聽 for j = 1 to LocalCount( n )
聽 聽 聽 聽 聽 聽 聽cErrorLog += " 聽 聽 Local " + Str( j, 3 ) + ": 聽 聽" + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ValType( GetLocal( n, j ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 " 聽 聽" + cGetInfo( GetLocal( n, j ) ) + CRLF
聽 聽 聽 聽 聽 next
聽 聽 聽 聽endif

聽 聽 聽 聽n++
聽 聽end

聽 聽cErrorLog += CRLF + "RDD麓s Enlazadas" + CRLF + "___________________________________________________" + CRLF + CRLF
聽 聽aRDDs = RddList( 1 )
聽 聽for n = 1 to Len( aRDDs )
聽 聽 聽 cErrorLog += " 聽 " + aRDDs[ n ] + CRLF
聽 聽next

聽 聽cErrorLog += CRLF + "Base de Datos en Uso: " + CRLF + "___________________________________________________" + CRLF + CRLF
聽 聽for n = 1 to 255
聽 聽 聽 if ! Empty( Alias( n ) )
聽 聽 聽 聽 聽cErrorLog += CRLF + Str( n, 3 ) + ": " + If( Select() == n,"=> ", " 聽 " ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 PadR( Alias( n ), 15 ) + Space( 20 ) + "RddName: " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ( Alias( n ) )->( RddName() ) + CRLF
聽 聽 聽 聽 聽cErrorLog += "___________________________________________________" + CRLF + CRLF
聽 聽 聽 聽 聽cErrorLog += " 聽 聽 RecNo 聽 聽RecCount 聽 聽BOF 聽 EOF" + CRLF
聽 聽 聽 聽 聽cErrorLog += " 聽 聽" + Transform( ( Alias( n ) )->( RecNo() ), "9999999" ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 " 聽 聽 聽" + Transform( ( Alias( n ) )->( RecCount() ), "9999999" ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 " 聽 聽 聽" + cValToChar( ( Alias( n ) )->( BoF() ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 " 聽 " + cValToChar( ( Alias( n ) )->( EoF() ) ) + CRLF + CRLF

聽 聽 聽 聽 聽if ( Alias( n ) )->( RddName() ) != "ARRAYRDD"
聽 聽 聽 聽 聽 聽 cErrorLog += "Indices en Uso: " + SPACE( 23 ) + "TagName" + CRLF
聽 聽 聽 聽 聽 聽 for j = 1 to 15
聽 聽 聽 聽 聽 聽 聽 聽if ! Empty( ( Alias( n ) )->( IndexKey( j ) ) )
聽 聽 聽 聽 聽 聽 聽 聽 聽 cErrorLog += Space( 8 ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽If( ( Alias( n ) )->( IndexOrd() ) == j, "=> ", " 聽 " ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽PadR( ( Alias( n ) )->( IndexKey( j ) ), 35 ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽( Alias( n ) )->( OrdName( j ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽CRLF
聽 聽 聽 聽 聽 聽 聽 聽endif
聽 聽 聽 聽 聽 聽 next
聽 聽 聽 聽 聽cErrorLog += CRLF+CRLF + "Relaciones en uso: " + CRLF
聽 聽 聽 聽 聽 聽 for j = 1 to 8
聽 聽 聽 聽 聽 聽 聽 聽if ! Empty( ( nTarget := ( Alias( n ) )->( DbRSelect( j ) ) ) )
聽 聽 聽 聽 聽 聽 聽 聽 聽 cErrorLog += Space( 8 ) + Str( j ) + ": " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"TO " + ( Alias( n ) )->( DbRelation( j ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽" INTO " + Alias( nTarget ) + CRLF
聽 聽 聽 聽 聽 聽 聽 聽 聽 // uValue = ( Alias( n ) )->( DbRelation( j ) )
聽 聽 聽 聽 聽 聽 聽 聽 聽 // cErrorLog += cValToChar( &( uValue ) ) + CRLF
聽 聽 聽 聽 聽 聽 聽 聽endif
聽 聽 聽 聽 聽 聽 next
聽 聽 聽 聽 聽endif
聽 聽 聽 endif
聽 聽next

聽 聽n = 1
聽 聽cErrorLog += CRLF+CRLF + "Clases en uso:" + CRLF
聽 聽cErrorLog += "___________________________________________________" + CRLF + CRLF

聽 聽#ifndef __XHARBOUR__
聽 聽 聽 while ! Empty( __ClassName( n ) )
聽 聽 聽 聽 聽cErrorLog += " 聽 " + Str( n, 3 ) + " " + __ClassName( n++ ) + CRLF
聽 聽 聽 end
聽 聽#else
聽 聽 聽 while n <= __ClsCntClasses()
聽 聽 聽 聽 聽cErrorLog += " 聽 " + Str( n, 3 ) + " " + __ClassName( n++ ) + CRLF
聽 聽 聽 end
聽 聽#endif

聽 聽cErrorLog += CRLF+CRLF + "Analisis de Memoria:" + CRLF
聽 聽cErrorLog += 聽 聽 聽 聽"___________________________________________________" + CRLF + CRLF

聽 聽#ifdef __CLIPPER__
聽 聽 聽 cErrorLog += "Memoria Estatica:" + CRLF
聽 聽 聽 cErrorLog += "Datos Segmentados: 64k" + CRLF
聽 聽#endif

聽 聽#ifdef __CLIPPER__
聽 聽cErrorLog += "Tama帽o inicial:" + ;
聽 聽 聽 聽 聽 聽 聽 聽 LTrim( Str( nInitDSSize() ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 " bytes 聽(SYMP=" + LTrim( Str( nSymPSize() ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 ", Stack=" + LTrim( Str( nStackSize() ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 ", Heap=" + LTrim( Str( nHeapSize() ) ) + ")" + CRLF
聽 聽cErrorLog += "PRG Stack: 聽 聽 聽 聽 聽" + ;
聽 聽 聽 聽 聽 聽 聽 聽 LTrim( Str( 65535 - ( nStatics() * 14 ) - nInitDSSize() ) ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 " bytes" + CRLF
聽 聽#endif

聽 聽#ifdef __CLIPPER__
聽 聽 聽 cErrorLog += " 聽 聽 聽" + LTrim( Str( nStatics() ) ) + " Static variables: " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽LTrim( Str( nStatics() * 14 ) ) + " bytes" + CRLF + CRLF
聽 聽#else
聽 聽 聽 cErrorLog += "" + LTRIM( STR( nStatics() ) ) + " Variables Estaticas" + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽CRLF + CRLF
聽 聽#endif

聽 聽cErrorLog += "Consumo Din谩mico de Memoria:" + CRLF
聽 聽cErrorLog += "Valor Actual: " + STR( MemUsed() ) + " bytes" + CRLF
聽 聽cErrorLog += "Valor M谩ximo: " + STR( MemMax() ) + " bytes" + CRLF

聽 聽// Generates a file with an Error Log
聽 聽BEGIN SEQUENCE
聽 聽 聽 oOldError = ErrorBlock( { || DoBreak() } )
聽 聽 聽 MemoWrit( Lower( cFileNoExt( HB_Argv( 0 ) ) )+"_Error.log", cErrorLog )
聽 聽END SEQUENCE
聽 聽ErrorBlock( oOldError )

聽 聽////// Dialogo
聽 聽DEFINE BRUSH oBrush COLOR CLR_FONDO_DLG
聽 聽DEFINE DIALOG oDlg TITLE DLG_TITLE SIZE 480, 285 BRUSH oBrush ;
聽 聽 聽 聽 聽 STYLE 聽nOr( WS_POPUP, WS_VISIBLE, WS_BORDER, 4 )

聽 聽@ 1, 1 BITMAP oBmp FILE "\mgIdeas\mgBmp\LogErr.bmp" SIZE 32,38 PIXEL NOBORDER ADJUST OF oDlg
聽 聽if oBmp:hBitmap == 0
聽 聽 聽 oBmp:End()
聽 聽 聽 oDlg:Update()
聽 聽end
聽 聽@ 0, 0 聽SAY oSay PROMPT cMessage CENTERED OF oDlg COLOR CLR_BLACK, CLR_FONDO_DLG FONT oFont SIZE 180, 55

聽 聽oSay:nStyle 聽 = nOR( oSay:nStyle, 128 ) 聽 // SS_NOPREFIX
聽 聽oSay:nTop 聽 聽 = 聽 3
聽 聽oSay:nLeft 聽 聽= 聽40
聽 聽oSay:nBottom 聽= 聽40
聽 聽oSay:nRight 聽 = 200

聽 聽@ 42, 6 SAY "&Stack List" OF oDlg COLOR CLR_WHITE, CLR_FONDO_DLG FONT oFont PIXEL

聽 聽n = aStack[ 1 ]

聽 聽@ 50, 3 LISTBOX oLbx VAR n ITEMS aStack OF oDlg COLOR CLR_BLACK, CLR_FONDO_LST SIZE 180, 74 PIXEL

聽 聽if nButtons == 1 .or. nButtons == 3
聽 聽 聽 @ 127, 聽20 BUTTON oBtn1 PROMPT "&Salir" 聽 聽 聽OF oDlg ACTION (oDlg:END()) 聽 聽 聽 聽 聽 聽 聽 聽 SIZE 30, 11 FONT oFont PIXEL DEFAULT
聽 聽 聽 @ 127, 聽67 BUTTON oBtn2 PROMPT "&Reintentar" OF oDlg ACTION ( lRet 聽:= .t., oDlg:END() ) SIZE 30, 11 FONT oFont PIXEL
聽 聽 聽 @ 127, 115 BUTTON oBtn3 PROMPT "&Default" 聽 聽OF oDlg ACTION ( lRet 聽:= .f., oDlg:END() ) SIZE 30, 11 FONT oFont PIXEL
聽 聽 聽 oBtn2:Disable()
聽 聽 聽 oBtn3:Disable()
聽 聽else
聽 聽 聽 @ 125, 15 BUTTON oBtn1 PROMPT "&Salir" OF oDlg ACTION oDlg:END() SIZE 30, 11 PIXEL FONT oFont
聽 聽endif

聽 聽if e:CanRetry
聽 聽 聽 @ 121, IF( nButtons == 2, 62, 62 ) BUTTON oBtn2 PROMPT "&Reintentar" OF oDlg ACTION ( lRet 聽:= .t., oDlg:END() ) SIZE 30, 11 FONT oFont PIXEL
聽 聽 聽 @ 121, 110 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 BUTTON oBtn3 PROMPT "&Default" 聽 聽OF oDlg ACTION ( lRet 聽:= .f., oDlg:END() ) SIZE 30, 11 FONT oFont PIXEL
聽 聽 聽 oBtn3:Disable()
聽 聽endif

聽 聽if e:CanDefault
聽 聽 聽 @ 125, 110 BUTTON oBtn3 PROMPT "&Default" 聽OF oDlg ACTION ( lRet 聽:= .f., oDlg:END() ) SIZE 30, 11 FONT oFont PIXEL
聽 聽endif

聽 聽@ 50,187 BUTTON "See Error.log file" OF oDlg FONT oFont PIXEL SIZE 48, 15 ;
聽 聽 聽 聽 聽 聽 ACTION WinExec( "Notepad.exe "+Lower( cFileNoExt( HB_Argv( 0 ) ) )+"_Error.log" )

聽 聽@ 70,187 BUTTON "Enviar x correo-e" 聽OF oDlg FONT oFont PIXEL SIZE 48, 15 ;
聽 聽 聽 聽 聽 聽 ACTION TSendMail():New():DlgMailErr()

聽 聽ACTIVATE DIALOG oDlg CENTERED ;
聽 聽 聽 聽 聽 聽 ON INIT Sonidos() 聽 ;

聽 聽if !Empty( oBmp )
聽 聽 聽 oBmp:End()
聽 聽end
聽 聽if lRet == nil .or. ( !LWRunning() .and. lRet )
聽 聽 聽 SET RESOURCES TO
聽 聽 聽 ErrorLevel( 1 )
聽 聽 聽 // Add these lines if using MDI child windows with dialogboxes
聽 聽 聽 // for n = 1 to Len( GetAllWin() )
聽 聽 聽 // 聽 聽if ValType( GetAllWin()[ n ] ) == "O"
聽 聽 聽 // 聽 聽 聽 GetAllWin()[ n ]:UnLink()
聽 聽 聽 // 聽 聽endif
聽 聽 聽 // next
聽 聽 聽 QUIT 聽 聽 聽 聽 聽 聽 聽// must be QUIT !!!
聽 聽endif

return lRet

//----------------------------------------------------------------------------//

static function DoBreak()

聽 聽BREAK

return nil

//----------------------------------------------------------------------------//

static function ErrorMessage( e )

聽 聽 // start error message
聽 聽 local cMessage := if( empty( e:OsCode ), ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if( e:severity > ES_WARNING, "Error ", "Warning " ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 "(DOS Error " + NTRIM(e:osCode) + ") " )

聽 聽 // add subsystem name if available
聽 聽 cMessage += if( ValType( e:SubSystem ) == "C",;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 e:SubSystem() 聽 聽 聽 聽 聽 聽 聽 聽,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 "???" )

聽 聽 // add subsystem's error code if available
聽 聽 cMessage += if( ValType( e:SubCode ) == "N",;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 "/" + NTRIM( e:SubCode ) 聽 ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 "/???" )
聽 聽 // add error description if available
聽 if ( ValType( e:Description ) == "C" )
聽 聽 聽 聽 cMessage += " 聽" + e:Description
聽 聽 end

聽 聽 // add either filename or operation
聽 聽 cMessage += if( ! Empty( e:FileName ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ": " + e:FileName 聽 ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if( !Empty( e:Operation ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ": " + e:Operation 聽 ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 "" ) )
return cMessage

//----------------------------------------------------------------------------//
// returns extended info for a certain variable type

static function cGetInfo( uVal )

聽 聽local cType := ValType( uVal )

聽 聽do case
聽 聽 聽 case cType == "C"
聽 聽 聽 聽 聽 聽return '"' + cValToChar( uVal ) + '"'

聽 聽 聽 case cType == "O"
聽 聽 聽 聽 聽 聽return "Class: " + uVal:ClassName()

聽 聽 聽 case cType == "A"
聽 聽 聽 聽 聽 聽return "Len: " + Str( Len( uVal ), 4 )

聽 聽 聽 otherwise
聽 聽 聽 聽 聽 聽return cValToChar( uVal )
聽 聽endcase

return nil

//----------------------------------------------------------------------------//

#define 聽HKEY_LOCAL_MACHINE 聽2147483650 聽// 0x80000002

function GetCPU()

聽 聽local oReg := TReg32():New( HKEY_LOCAL_MACHINE,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"HARDWARE\DESCRIPTION\System\CentralProcessor\0",;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽.f. )
聽 聽local cCpu := oReg:Get( "ProcessorNameString" )

聽 聽oReg:Close()


return cCpu

//----------------------------------------------------------------------------//

#ifdef __HARBOUR__
聽 聽#ifndef __XHARBOUR__
聽 聽 聽 REQUEST HB_GT_GUI_DEFAULT
聽 聽 聽 procedure HB_GTSYS() ; return
聽 聽 聽 // procedure HB_GT_GUI_DEFAULT() ; return
聽 聽 聽 procedure FW_GT ; return
聽 聽#endif
#endif

//----------------------------------------------------------------------------//
static function Sonidos()

聽 聽Tone(2000,3)
聽 聽Tone(3000,3)

return nil

//----------------------------------------------------------------------------//
static function FechaErr()
local aMes:= {" ENE'"," FEB'"," MAR'", " ABR'", " MAY'", " JUN'", " JUL'", " AGO'", " SEP'", " OCT'", " NOV'", " DIC'" }, ;
聽 聽 聽 nMes:= Month( Date() )
local cMes:= aMes[nMes]


return ( StrZero( Day( Date() ), 2 )+cMes+Str( Year( Date() ),4 ) )

cual es el problema?
gracias...
Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Problema al compilar con Harbour (errsysw)
Posted: Wed May 20, 2015 12:48 PM
Intenta a帽adir al final

Code (fw): Select all Collapse
#ifdef __HARBOUR__
   #ifndef __XHARBOUR__
      REQUEST HB_GT_GUI_DEFAULT
      PROCEDURE HB_GTSYS() ; return
      procedure FW_GT ; return
   #endif
#endif
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM
Re: Problema al compilar con Harbour (errsysw)
Posted: Wed May 20, 2015 12:58 PM

Navarro, gracias por responder
al final del codigo que pas茅 esta incluido :(

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Problema al compilar con Harbour (errsysw)
Posted: Wed May 20, 2015 02:08 PM

Mario, yo lo he incluido en un proyecto y salvo la clase TSendMail (que no la tengo) compila y linka perfectamente
Que librerias estas usando en el .mak o .bat?

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM
Re: Problema al compilar con Harbour (errsysw)
Posted: Wed May 20, 2015 02:44 PM
El proceso es el siguiente
Mediante un .mak, compilo (genero el obj) de errsysw
Code (fw): Select all Collapse
##############################################################################
# Template para construir librerias.                                         # 
# Copyright (c) 2004 Hernan Diego Ceccarelli.                                #
##############################################################################

# Win2000 bug ################################################################
# Uncomment next line if you receive any DEL error ###########################
# set DEL=cmd /c del

!if !$d(DEL)
   DEL = del 
!endif

# Directorios Principales ####################################################

FIVEWIN_DIR   = \Harbour\fwh
HARBOUR_DIR   = \xHarbour
BORLANDC_DIR  = \bcc582

# Make directives ############################################################

.swap
.suffixes: .prg 

# Application directories & filenames ########################################

LIB_NAME         = MiFWH    # (Your LIB name without extension)
LIB_PRG_DIR      = sources  # .
LIB_OBJ_DIR      = obj      # (create the app\obj directory first)
LIB_INCLUDE_DIR  = include  # .
LIB_LIB_DIR      = lib      # $(LIB_PRG_DIR)

LIB_LIB  = $(LIB_LIB_DIR)\$(LIB_NAME).lib


# Paths for dependent files ##################################################

.path.c   = $(LIB_PRG_DIR)
.path.prg = $(LIB_PRG_DIR)
.path.obj = $(LIB_OBJ_DIR)

# Application PRG and C files (your PRG/C files go here) #####################

LIB_PRG_LIST = \
    alert.prg\
        errsysw.prg\

# Contruction of the rest dependency lists ###################################

LIB_PRGS = $(LIB_PRG_LIST)

TMP_001  = $(LIB_PRG_LIST:.prg=.obj)
LIB_OBJ  = $(TMP_001:.c=.obj)

LIB_TMP0 = OBJ\$(LIB_OBJ:.obj=.obj +OBJ\)
LIB_TMP1 = $(LIB_TMP0: =)
LIB_TMP2 = $(LIB_TMP1:.obj=.obj )_
LIB_TMP3 = +$(LIB_TMP2:+OBJ\_=)

En realidad me genera un .lib, pero de \OBJ tomo lo que me interesa
Luego mediante TLib (Borland 5.82) lo incluyo en la lib con: TLib fiveh[.lib] -+errsysw[.obj]
Luego al intentar usar compilando cualquier prg, me devuelve el error comentado
Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM
Re: Problema al compilar con Harbour (errsysw)
Posted: Thu May 21, 2015 11:06 AM

No hay soluci贸n? :idea:

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Problema al compilar con Harbour (errsysw)
Posted: Thu May 21, 2015 11:57 AM

Mario, quizas el problema venga tambien derivado de la version con la que se creo inicialmente la libreria y la que tu usas (tanto de Harbour como de Borland)
De momento, puedes usarlo como un prg mas del proyecto

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM
Re: Problema al compilar con Harbour (errsysw)
Posted: Thu May 21, 2015 12:18 PM

A veces es bueno que nadie conteste :wink: , porque te obliga a rebuscar en lo mas profundo de tus conocimientos o en, como es mi caso, en lo intuitivo :D

Tome un sample y construi una app incluyendo errsysw (como hizo Navarro)
Lo prueba, y me muestra su contenido seg煤n el fuente.
Luego tomo el .obj, lo incluyo en fiveh.lib; quito errsys.prg de mi app sample, compilo nuevamente, y ya no da error. Ejecuto, y obviamente todo segun lo esperado.
Conclusi贸n: el .mak que usaba para construir o reconstruir libs con xHarbour debe incluir u obviar algun par谩metro que provoca el error.
Si alguien pudiera corregirlo ser铆a muy util. O al menos lo es para mi, desde que lo tome de los fuentes de wBrowse de Checcarelli lo uso con buen resultado.

Navarro, gracias por ocuparte

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina

Continue the discussion