Hi Pritpal, > In -xhb mode hbMK2 is issueing -n switch as > first parameter to harbour.exe no matter if I set it as > -n0 whatever which probably 2007 Xharbour does not understand and > issued Error E001 is > ABC.PRG(32) Error E0001 Statement not allowed outside of procedure or > function. > > Then I tried to pass -n- as a flag in .hbp and the error disappeared. > Is it normal behavior ?
Yes. Not having better option than -n in xhb, hbmk2 uses -n. [ Disclaimer: I assume -n in xhb does the same as -n does in Harbour. If this is not true, someone will have to correct me. ] > Syntax: C:\xharbour\bin\harbour.exe <file[s][.prg]> [options] > > So probably in -xhb mode, > C:\xharbour\bin\harbour.exe -n file(s).prg -m -w0 -es0 -D... > -n is invening something. > > Also with above flags I get in bulk warnings like: > C:\dev_projects\some.prg(50) Warning W0001 Ambiguous reference: 'E_VAR' > and process terminates. > > Any idea, what should I look into? Try to enclose code in PROCEDUREs. --- hello.prg ? "hello" --- -> --- hello.prg PROCEDURE HELLO ? "hello" RETURN --- Or use '-n-'. Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
