UT - Running on raspberry pi 5
Hello, good day.
Finally, I was able to run UT on a Debian Linux.
Thanks for the help, Charly!!!.
These would be the changes in the sources:
/***************/
FUNCTION UCompile( cCode, cCodePP )
LOCAL oHrb
LOCAL hPP
LOCAL cOs := OS()
LOCAL cHBHeader := ''
LOCAL cHbInclude := nil
LOCAL cPrgFlags := nil
DEFAULT cCodePP TO ''
DO CASE
CASE "Windows" $ cOs ; cHBHeader := "c:\harbour\include"
CASE "Linux" $ cOs ; cHBHeader := "~/harbour/include"
ENDCASE
if !empty( hb_GetEnv( "HB_INCLUDE" ) )
cHbInclude:= "-I" + hb_GetEnv( "HB_INCLUDE" )
endif
if !empty( hb_GetEnv( "HB_USER_PRGFLAGS" ) )
cPrgFlags:= hb_GetEnv( "HB_USER_PRGFLAGS" )
endif
hPP := UAddPPRules()
UReplaceBlocks( @cCode, "{%", "%}" )
cCodePP := __pp_Process( hPP, cCode )
oHrb = HB_CompileFromBuf( cCodePP, .T., "-n", "-q2", "-I" + cHBheader, ;
cHbInclude, cPrgFlags )
RETU oHrb
The problem was when compiling with the function HB_CompileFromBuf().
The parameters that are empty should be sent as NIL values and not as empty strings. So,
if the variable hb_GetEnv( "HB_INCLUDE" ) was not defined, this variable was sent as an empty string,
but it should be of type NIL.
This is using Linux-Debian on a Raspberry Pi 5 computer!
Best Regards
Osvaldo Ramirez