Page 1 of 1

To Antonio: premature EXECUTION error

Posted: Thu Feb 02, 2017 4:40 pm
by HunterEC
Antonio:

The link process goes ok, it builds the program, but when I called the program, it shows the following error. Can you take a look at it ? Thank you !

ERROR MESSAGE:

Code: Select all

===========
   Path and name: C:\Apps\REPMENU\repmenu.exe (32 bits)
   Size: 3,870,208 bytes
   Compiler version: Harbour 3.2.0dev (r1601050904)
   FiveWin  Version: FWH 16.06
   Windows version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 0 secs 
   Error occurred at: 02/02/17, 12:50:55
   Error description: Error BASE/3104  Argument error: SWITCH
   Args:
     [   1] = U   

Stack Calls
===========
   Called from: REPMENU.prg => MAIN( 0 )
Beginning of code:

Code: Select all


#define DRIVER "DBFCDX"

PROCEDURE Main
   LOCAL nScrWidth, nScrHeight
   LOCAL nI, nIndex, dDate, cDataPath, nDays
   LOCAL GetList := {}, lOpenDbfs, cPath
   LOCAL oWindow, oMenu, oIcon, oBitMap, oBru

   rddRegister( DRIVER, 1 )
   rddsetdefault( DRIVER )
   ThreadSleep( 100 )
 
Link script:

Code: Select all

#Borland make sample, (c) FiveTech Software 2005-2014

HBDIR=c:\harbourb
HDIRL=$(HBDIR)\lib
BCDIR=c:\bcc7
FWDIR=c:\fwh
FWH=$(FWDIR)

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\
.path.rc  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG =        \
REPMENU.PRG  \
NETWORK.PRG  \
SCATGATH.PRG \
INTERF.PRG

PROJECT    : REPMENU.EXE

REPMENU.EXE  : $(PRG:.PRG=.OBJ)
   echo on
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo $(PRG:.PRG=.OBJ), + >> b32.bc
   echo repmenu.exe, + >> b32.bc
   echo repmenu.map, + >> b32.bc
   echo $(FWDIR)\lib\FiveH.lib + >> b32.bc
   echo $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HDIRL)\hbwin.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
   echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
   echo $(HBDIR)\lib\hblang.lib + >> b32.bc
   echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
   echo $(HBDIR)\lib\rddntx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddfpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
   echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
   echo $(HDIRL)\hbcpage.lib + >> b32.bc
   echo $(HDIRL)\hbcplr.lib + >> b32.bc
   echo $(HBDIR)\lib\hbct.lib + >> b32.bc
   echo $(HDIRL)\hbpcre.lib + >> b32.bc
   echo $(HDIRL)\xhb.lib + >> b32.bc
   echo $(HBDIR)\lib\hbziparc.lib + >> b32.bc
   echo $(HDIRL)\hbmzip.lib + >> b32.bc
   echo $(HBDIR)\lib\hbzlib.lib + >> b32.bc
   echo $(HDIRL)\minizip.lib + >> b32.bc
   echo $(HDIRL)\png.lib + >> b32.bc
   echo $(HDIRL)\hbusrrdd.lib + >> b32.bc
   echo $(HDIRL)\hbtip.lib + >> b32.bc

   echo %mylib%\Sentinel_xhb.lib + >> b32.bc
   echo %mylib%\sx32w.lib + >> b32.bc

   rem Uncomment these two lines to use Advantage RDD
   rem echo $(HDIRL)\rddads.lib + >> b32.bc
   rem echo $(HDIRL)\Ace32.lib + >> b32.bc

   rem echo $(FWH)\lib\dolphin.lib + >> b32.bc
   rem echo $(FWH)\lib\libmysql.lib + >> b32.bc

   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\uuid.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc

   IF EXIST repmenu.res echo repmenu.res >> b32.bc

   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s -jOBJ\ @b32.bc
   del b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /N /W /ES2 /DDEBUG /B /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include >> compiler.txt
  @type compiler.txt
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

 

Re: To Antonio: premature EXECUTION error

Posted: Thu Feb 02, 2017 5:42 pm
by Baxajaun
Hunter,

please, review viewtopic.php?t=9142

Best regards

Re: To Antonio: premature EXECUTION error

Posted: Thu Feb 02, 2017 5:51 pm
by HunterEC
Baxajaun:

Thank you for your help. I took a look at the post but I don't use any Excel related functions or fonts. I searched my FW & Harbour folders and I don't have any file called "FileXLS.ch". Contrary to the post that you mention, the program crashes at line 0 in the first module. Any ideas ?

Re: To Antonio: premature EXECUTION error

Posted: Thu Feb 02, 2017 5:53 pm
by Baxajaun
Hunter,

please review your source code repmenu.prg, look for "SWITCH".

Best regards,

Re: To Antonio: premature EXECUTION error

Posted: Thu Feb 02, 2017 6:37 pm
by karinha

Code: Select all

   #define DRIVER "DBFCDX"
 
Or

Code: Select all

   REQUEST DBFCDX
 
???

Re: To Antonio: premature EXECUTION error

Posted: Thu Feb 02, 2017 8:16 pm
by Antonio Linares
Gustavo,

As Felix tells you, there is an error in your repmenu.prg

Re: To Antonio: premature EXECUTION error

Posted: Thu Feb 02, 2017 9:16 pm
by HunterEC
No SWITCH command anywhere.

I compiled with the buildh.bat and included the other modules (PRGs) at the end of the main PRG with:

Code: Select all

#include "Filename.prg"
and it's running perfectly.

There has to be something with the MAK file. Thank you very much Antonio and Felix !!!

PD: Antonio, can you verify the MAK file ?

Re: To Antonio: premature EXECUTION error

Posted: Thu Feb 02, 2017 10:53 pm
by Antonio Linares
Gustavo,

The error is at runtime, that means that the EXE was properly built by the make

Please remove /l flag when calling Harbour, this way we can know the exact line number
where it errors

Please post here the source of repmenu.prg