FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Again about scripting - __HrbRun ...
Posts: 437
Joined: Fri Oct 07, 2005 12:56 PM
Again about scripting - __HrbRun ...
Posted: Thu Apr 14, 2011 07:08 PM
Hi friends !

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 (fw): Select all Collapse
...
      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 !
Rimantas U.

Continue the discussion