To Antonio: premature EXECUTION error

To Antonio: premature EXECUTION error

Postby HunterEC » Thu Feb 02, 2017 4:40 pm

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  Expand view
===========
   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  Expand view


#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  Expand view

#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

 
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: To Antonio: premature EXECUTION error

Postby Baxajaun » Thu Feb 02, 2017 5:42 pm

Hunter,

please, review [url]viewtopic.php?t=9142[/url]

Best regards
User avatar
Baxajaun
 
Posts: 968
Joined: Wed Oct 19, 2005 2:17 pm
Location: Gatika. Bizkaia

Re: To Antonio: premature EXECUTION error

Postby HunterEC » Thu Feb 02, 2017 5:51 pm

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 ?
Last edited by HunterEC on Thu Feb 02, 2017 5:53 pm, edited 1 time in total.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: To Antonio: premature EXECUTION error

Postby Baxajaun » Thu Feb 02, 2017 5:53 pm

Hunter,

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

Best regards,
User avatar
Baxajaun
 
Posts: 968
Joined: Wed Oct 19, 2005 2:17 pm
Location: Gatika. Bizkaia

Re: To Antonio: premature EXECUTION error

Postby karinha » Thu Feb 02, 2017 6:37 pm

Code: Select all  Expand view

   #define DRIVER "DBFCDX"
 


Or

Code: Select all  Expand view

   REQUEST DBFCDX
 


???

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7794
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: To Antonio: premature EXECUTION error

Postby Antonio Linares » Thu Feb 02, 2017 8:16 pm

Gustavo,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42068
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: To Antonio: premature EXECUTION error

Postby HunterEC » Thu Feb 02, 2017 9:16 pm

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  Expand view
#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 ?
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: To Antonio: premature EXECUTION error

Postby Antonio Linares » Thu Feb 02, 2017 10:53 pm

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42068
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests