Some time ago I asked about scripting and you helped me . I tried both versions Harbour and xHarbour . Harbour in this place is better - have hb_compileBuf() function . Sorry , but I have some places where I must use xHarbour . And don't know how to solve one problem. Here is source :
- Code: Select all Expand view
...
if lCompile
Compile( cPrg )
endif
if file( cMain_prgs + cPrg + ".hrb" )
__HrbRun( cMain_prgs + cPrg + ".hrb" )
endif
...
function Compile( cPrgName )
local cCmd := cMain_path + "harbour.exe " + cMain_prgs + cPrgName + ;
" /o" + cMain_prgs + " /n /gh /ihrb_incl;fwh_incl"
WinExec( cCmd, 0 )
do while !File( cMain_prgs + cPrgName + ".hrb" )
SysRefresh()
enddo
return( NIL )
The main problem is that if I did mistake in prg file , how to catch error from compiler and to view errors . With xHarbour compiler . I reviewed harbour.exe options and didn't find how to do output of compilation ... . Or didn't understand ...
With best regards and thanks in advance !