Page 1 of 2
Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 1:44 pm
by Verhoven
La compilación en xHarbour va bien.
Pero el mismo código fuento en Harbour no pasa.
Les ruego una ayuda porque no los entiendo. Los errores son los siguientes:
Error E0030 Syntax error "syntax error at '|'"
Código:
- Code: Select all Expand view
cPathDestino:=cGetDir( "Seleccione Carpeta",cPathDestino,,;
"Seleccione la carpeta donde copiar las novedades para ordenador CENTRAL", BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN + BIF_USENEWUI + BIF_NONEWFOLDERBUTTON )
Error E0030 Syntax error "syntax error at ','"
Código:
- Code: Select all Expand view
REDEFINE BUTTON oBtnDel ID 426 OF oDlg MESSAGE 'Borra último dígito';
ACTION (::cUltima:='CE' ,;
iif(::cUltimaOp='=' .or. ::cUltimaOp='AP' .or. ::cUltimaOp='AE',(::cUltimaOp:='',::nResult:=0,aadd( ::aRolloCalc, {' ',' '} ), oBrw:gobottom(),oBrw:refresh()),NIL),;
iif(nGet<>0,( ,;
cGet:=LEFT(cGet,len(cget)-1),;
nGet:=val(cGet)),NIL) ,;
oGet:SetText(cGet) ,;
oBtnIgual:Setfocus() ,;
sysrefresh() ) UPDATE
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 1:52 pm
by Carles
Prueba
- Code: Select all Expand view
iif(nGet<>0,( ;
en lugar de
- Code: Select all Expand view
iif(nGet<>0,( ,;
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 4:25 pm
by Verhoven
Hola Carles,
Entiendo que la solución que me dices no puede ser, pues la coma lo que hace es separar las distintas variables de una función y si la quito va a asignar a una variable de la función el valor que en realidad se quiere pasar a otra.
Saludos.
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 4:39 pm
by Verhoven
El suguiente código también da el error: Error E0030 Syntax error "syntax error at ','"
- Code: Select all Expand view
ACTIVATE DIALOG oDlg CENTER ON INIT(iif(lBtnProd[1] .and. lEligeMa,NIL,oBtnProd1:hide()),;
iif(lBtnProd[2] .and. lEligeMa,NIL,oBtnProd2:hide()),;
iif(lBtnProd[3] .and. lEligeMa,NIL,oBtnProd3:hide()),;
iif(lBtnProd[4] .and. lEligeMa,NIL,oBtnProd4:hide()),;
oBtnCancelar:hide() )
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 4:47 pm
by Biel EA6DD
Yo creo que Carles tiene razón.
- Code: Select all Expand view
iif(nGet<>0,( ,;
cGet:=LEFT(cGet,len(cget)-1),;
nGet:=val(cGet)),NIL) ,;
La coma sobra, no separa parámetros, separa acciones a realizar cuano nGet<>0
iif
(nGet<>0,
( , cGet:=LEFT(cGet,len(cget)-1), nGet:=val(cGet) ) ,
NIL) Este a mi no me da error.
Verhoven wrote:El suguiente código también da el error: Error E0030 Syntax error "syntax error at ','"
- Code: Select all Expand view
ACTIVATE DIALOG oDlg CENTER ON INIT(iif(lBtnProd[1] .and. lEligeMa,NIL,oBtnProd1:hide()),;
iif(lBtnProd[2] .and. lEligeMa,NIL,oBtnProd2:hide()),;
iif(lBtnProd[3] .and. lEligeMa,NIL,oBtnProd3:hide()),;
iif(lBtnProd[4] .and. lEligeMa,NIL,oBtnProd4:hide()),;
oBtnCancelar:hide() )
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 4:49 pm
by Verhoven
Ya he conseguido eliminar el error de las ",". Harbour es más extricto que xHarbour con este asunto. No se puede poner una secuencia de instrucciones separadas por comas y que entre dos de ellas no se ponga nada.
Pero no logro quitar el error: Syntax error "syntax error at '|'" del código:
- Code: Select all Expand view
cPathDestino:=cGetDir( "Seleccione Carpeta","C:\",,;
"Seleccione la carpeta donde hacer la copia de seguridad", BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN + BIF_USENEWUI + BIF_NONEWFOLDERBUTTON )
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 5:31 pm
by karinha
Intenta ahora...
- Code: Select all Expand view
#include "FiveWin.ch"
#define BIF_NONEWFOLDERBUTTON 0x200
#define BIF_RETURNONLYFSDIRS 0x0001
#define BIF_DONTGOBELOWDOMAIN 0x0002
#define BIF_STATUSTEXT 0x0004
#define BIF_RETURNFSANCESTORS 0x0008
#define BIF_EDITBOX 0x0010
#define BIF_VALIDATE 0x0020
#define BIF_NEWDIALOGSTYLE 0x0040
#define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)
#define BIF_BROWSEINCLUDEURLS 0x0080
#define BIF_BROWSEFORCOMPUTER 0x1000
#define BIF_BROWSEFORPRINTER 0x2000
#define BIF_BROWSEINCLUDEFILES 0x4000
#define BIF_SHAREABLE 0x8000
#define MAX_PATH 260
FUNCTION Main()
LOCAL cTitle, cPath, cCarpDest, cPathDest
cTitle := "Seleccione Carpeta"
IF FWVERSION = "FWHX 13.06"
cPath := GETCURDIR()
ELSE
cPath := CURDRIVE() + ":\" + GETCURDIR()
ENDIF
cCarpDest := "Seleccione la carpeta donde copiar las novedades"
cPathDest := cGetDir( cTitle, cPath,, cCarpDest, ;
BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN + ;
BIF_USENEWUI + BIF_NONEWFOLDERBUTTON )
IF .NOT. EMPTY( cPathDest )
? cPathDest
ENDIF
RETURN NIL
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 7:26 pm
by Verhoven
Los defines ya los tenía incluidos en el programa. He probado el ejemplo tal y como me lo has enviado y arroja el mismo error.
cgetdir.prg(36) Error E0030 Syntax error "syntax error at '|'"
Ese mismo código en xHarbour no da el error.
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 7:41 pm
by karinha
Porfa, cambia cGetdir() por cGetFile() si dá el mismo error...
No te falta ninguna LIB de Harbour?
http://wiki.fivetechsoft.com/doku.php?id=fivewin_function_cgetdirSaludos.
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 7:57 pm
by Verhoven
Arroja el mismo error.
Uso el propio Buildh.bat que viene con la versión FWH32 14.11 y Harbour 3.2.0dev (r1406271520).
Copio el Buildh.bat que trae FW al que añado solamente una línea para incluir la librería TWBRWX32_H.lib (Browse de Hernan):
- Code: Select all Expand view
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour 14.11 - Nov. 2014 Harbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2014 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
if "%FWDIR%" == "" set FWDIR=C:\fwh
if "%HBDIR%" == "" set HBDIR=c:\harbour
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set GT=gtgui
ECHO Compiling...
set hdir=%HBDIR%
set hdirl=%hdir%\lib
set fwh=%FWDIR%
if exist c:\bcc582 set bcdir=c:\bcc582
rem if exist c:\bcc64 set bcdir=c:\bcc64
%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /p %2 %3 > comp.log 2> warnings.log
if errorlevel 1 goto COMPILEERRORS
@type comp.log
@type warnings.log
echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -w-aus @b32.bc
:ENDCOMPILE
IF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include -I%bcdir%\include\windows\sdk %1
rem IF EXIST %1.rc %vcdir%\bin\rc -r -d__FLAT__ %1
echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
rem Hay que poner delante las que sustituyen a las de FW, o mejor dicho
rem el enlazador pone en el exe las que primero encuentra !
echo C:\CLIWIN\TBROWSE17b\LIB\TWBRWX32_H.lib + >> b32.bc
echo %fwh%\lib\FiveH.lib %fwh%\lib\FiveHC.lib %fwh%\lib\libmysql.lib %fwh%\lib\dolphin.lib + >> b32.bc
echo %hdirl%\hbwin.lib + >> b32.bc
echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\hbrtl.lib + >> b32.bc
echo %hdirl%\hbvm.lib + >> b32.bc
echo %hdirl%\hblang.lib + >> b32.bc
echo %hdirl%\hbmacro.lib + >> b32.bc
echo %hdirl%\hbrdd.lib + >> b32.bc
echo %hdirl%\rddntx.lib + >> b32.bc
echo %hdirl%\rddcdx.lib + >> b32.bc
echo %hdirl%\rddfpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\hbdebug.lib + >> b32.bc
echo %hdirl%\hbcommon.lib + >> b32.bc
echo %hdirl%\hbpp.lib + >> b32.bc
echo %hdirl%\hbcpage.lib + >> b32.bc
echo %hdirl%\hbcplr.lib + >> b32.bc
echo %hdirl%\hbct.lib + >> b32.bc
echo %hdirl%\hbpcre.lib + >> b32.bc
echo %hdirl%\xhb.lib + >> b32.bc
echo %hdirl%\hbziparc.lib + >> b32.bc
echo %hdirl%\hbmzip.lib + >> b32.bc
echo %hdirl%\hbzlib.lib + >> b32.bc
echo %hdirl%\minizip.lib + >> b32.bc
echo %hdirl%\png.lib + >> b32.bc
echo %hdirl%\hbcurl.lib + >> b32.bc
echo %hdirl%\hbusrrdd.lib + >> b32.bc
echo %hdirl%\hbcomm.lib + >> b32.bc
echo %fwh%\lib\libcurl.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\wininet.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 %1.res echo %1.res >> b32.bc
if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
rem signtool.exe sign /fd sha256 %1.exe
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
:COMPILEERRORS
@type comp.log
@type warnings.log
ECHO * Compile errors *
GOTO EXIT
:LINKERROR
ECHO * Linking errors *
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 8:18 pm
by Antonio Linares
El error viene de esta línea:
#define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)
hay que cambiarla por:
#define BIF_USENEWUI nOr( BIF_NEWDIALOGSTYLE, BIF_EDITBOX )
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 8:30 pm
by Verhoven
Con lo que dice Antonio queda arreglado ese error.
Pero ahora me da otros nuevos en el linkado:
call to function hb_itemRelease with no prototipe
call to function hb_itemReturn with no prototipe
call to function hb_itemArrayNew with no prototipe
call to function hb_itemPutC with no prototipe
unresolved external __HB_FUN_DBSKIPPER
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 8:58 pm
by Antonio Linares
Añade este fichero de cabecera:
#include <hbapiitm.h>
Y prueba a añadir esta función:
function DBSKIPPER( x )
return __DBSkipper( x )
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 9:18 pm
by Verhoven
Antonio he añadido ese archivo de cabecera pero me dice el compilador que no encuentra el archivo include stdarg.h
Re: Migrar a Harbour - Errores del compilador
Posted:
Tue Dec 16, 2014 9:23 pm
by Antonio Linares
Tienes Borland configurado como se explica aqui ?
viewtopic.php?f=17&t=13098