FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Pasando a Harbour - Consulta (Antonio por favor leer)
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM

Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Fri Jul 11, 2014 02:27 PM
Gente;
Hice pruebas de compilaci贸n de varios samples de FWH, sin problemas.
Ahora bien, al compilar un .prg mio me ocurre que me da error en una linea con clausula IN al consultar por una clave Hash
Code (fw): Select all Collapse
 聽 if ! "PATHBACK" IN ::hIniBck
聽 聽 聽 ::hIniBck["PATHBACK"]:= Hash()
聽 聽 聽 ::hIniBck["PATHBACK"]["hdfuente" ]:= ""
聽 聽 聽 ::hIniBck["PATHBACK"]["hddestino"]:= ""
聽 else
聽 聽 聽 if hScan( ::hIniBck["PATHBACK"], {|k,v,i| k=="hdfuente" } ) == 0
聽 聽 聽 聽 聽::hIniBck["PATHBACK"]["hdfuente"]:= ""
聽 聽 聽 end
聽 聽 聽 if hScan( ::hIniBck["PATHBACK"], {|k,v,i| k=="hddestino" } ) == 0
聽 聽 聽 聽 聽::hIniBck["PATHBACK"]["hddestino"]:= ""
聽 聽 聽 end
聽 聽end

Error:
Harbour 3.2.0dev (r1307082134)
Copyright (c) 1999-2013, http://harbour-project.org/
d:\MIHARB~1\TEmege\Sources\MGTBck32.prg(111) Error E0030 Syntax error "syntax error at 'IN'"
d:\MIHARB~1\TEmege\Sources\MGTBck32.prg(115) Error E0030 Syntax error "syntax error at 'ELSE'"
d:\MIHARB~1\TEmege\Sources\MGTBck32.prg(122) Error E0030 Syntax error "syntax error at 'END'"
d:\MIHARB~1\TEmege\Sources\MGTBck32.prg(123) Error E0030 Syntax error "syntax error at 'IN'"
que me falta?

Antonio:
Otro error en la compilaci贸n es sobre la funci贸n Str(), usada segun xHarbour, que tiene el formato:
Code (fw): Select all Collapse
Str( <nNumber> 聽 , ;
聽 聽 [<nLength>] 聽, ;
聽 聽 [<nDecimals>], ;
聽 聽 [<lTrim>] 聽 聽 聽) --> cString

donde lo interesante es lTrim: This parameter defaults to .F. (false). When .T. (true) is passed, the returned string has no leading spaces.

Para harbour no es relevante esta implementaci贸n?

gracias
Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Fri Jul 11, 2014 02:34 PM

Agrego:
utilizo en las mayorias de mis cabeceras lo siguiente:

define _NOOBJECTS_CH // Excluye comandos OOP definidos en FW

include "hbclass.ch"

include "fivewin.ch"

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Fri Jul 11, 2014 03:09 PM

Tambien me da error en los .prg que incluyo variables GLOBAL

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Fri Jul 11, 2014 04:19 PM

ifdef HARBOUR

ifndef XHARBOUR

include "hbcompat.ch"

include "xhb.ch"

endif

endif

en harbour, tendrias que incluir la xhb.lib, la cual contiene muchas de las funciones que se usan exclusivamente en xharbour.
ademas debo indicarte que variables de tipo GLOBAL no existen como tal en harbour, deberas usar PUBLIC en su lugar en donde creas las variables.
y omitir GLOBAL EXTERNAL en los otros prgs.

salu2
carlos vargas

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Fri Jul 11, 2014 04:36 PM

Mario,

Carlos te lo ha explicado perfectamente :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Fri Jul 11, 2014 09:03 PM

Mucha gracias!
Todo es sencillo despues que te lo explican! :lol:

Antonio; tambi茅n le铆 tu respuesta respecto de Str()... en otro post

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Mon Jul 14, 2014 01:57 PM

Gente;
He descargado de Harbour and xHarbour builds harbour_bcc582_20131007.zip
Pero en las carpetas respectivas no estan: xhb.lib, xhb.ch y hbcompat.ch
solucion?

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Mon Jul 14, 2014 02:47 PM

deja que llege al trabajo, y te pongo en el ftp el harbour que he compilado del git

salu2
carlos vargs

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Mon Jul 14, 2014 03:40 PM

Mario,

Es que esas librer铆as son contribuciones de Harbour, y no propias del proyecto en si

Pero Carlos te las env铆a y listo :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Mon Jul 14, 2014 05:45 PM
http://www.donboscocorp.com/carlos/prog/harbour.zip

por favor pruebas y me comentas

ok, puede para efectos de prueba, puedes tomar solo la lib que necesitas y los ch que necesitas.
de este zip que te ofresco.


salu2
carlos vargas
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 392
Joined: Tue Jul 29, 2008 01:55 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Mon Jul 14, 2014 06:21 PM

Hola Carlos.

Podrias incluir es este zip, la carpeta docs y samples ?

Saludos

Visite Chiapas, el paraiso de M茅xico.
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Tue Jul 15, 2014 02:37 AM

Carlos;
muchisimas gracias por el comprimido.
Como dijo el otro colega, esar铆a bueno contar con samples y documentacion, si la tienes

Estar茅 comentando mis experiencias de migraci贸n

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Tue Jul 15, 2014 06:34 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Tue Jul 15, 2014 10:14 AM

gracias Antonio

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM

Re: Pasando a Harbour - Consulta (Antonio por favor leer)

Posted: Tue Jul 15, 2014 02:25 PM
Gente;
sigo sin poder avanzar.
Compilo con:
Harbour 3.2.0dev (r1307082134)
Copyright (c) 1999-2013, http://harbour-project.org/

o, con la que me envio Carlos
Harbour 3.2.0dev (r1406161338)
Copyright (c) 1999-2014, http://harbour-project.org/
sources\MGTBck32.prg(118) Error E0030 Syntax error "syntax error at 'IN'"
sources\MGTBck32.prg(122) Error E0030 Syntax error "syntax error at 'ELSE'"
sources\MGTBck32.prg(129) Error E0030 Syntax error "syntax error at 'END'"
sources\MGTBck32.prg(130) Error E0030 Syntax error "syntax error at 'IN'"
sources\MGTBck32.prg(136) Error E0030 Syntax error "syntax error at 'ELSE'"
sources\MGTBck32.prg(153) Error E0030 Syntax error "syntax error at 'END'"
sources\MGTBck32.prg(213) Error E0017 Unclosed control structure 'IF'
sources\MGTBck32.prg(263) Error E0030 Syntax error "syntax error at 'IN'"
sources\MGTBck32.prg(266) Error E0030 Syntax error "syntax error at 'ELSEIF'
sources\MGTBck32.prg(269) Error E0030 Syntax error "syntax error at 'END'"
sources\MGTBck32.prg(377) Error E0017 Unclosed control structure 'IF'


Cambio de .prg (un sample de TDolphin) y el error se produce en un TRY!
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(16) Error E0020 Incomplete statement or unbalanced delimiters
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(19) Error E0030 Syntax error "syntax error at 'OERR'"
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(22) Error E0014 ELSE does not match IF
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(25) Error E0030 Syntax error "syntax error at 'END'"
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(34) Error E0020 Incomplete statement or unbalanced delimiters
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(40) Error E0030 Syntax error "syntax error at 'OSERVER'"
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(42) Error E0030 Syntax error "syntax error at 'OERR'"
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(45) Error E0030 Syntax error "syntax error at 'END'"
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(61) Error E0020 Incomplete statement or unbalanced delimiters
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(69) Error E0030 Syntax error "syntax error at 'ASERVER'"
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(75) Error E0030 Syntax error "syntax error at 'ASERVER'"
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(77) Error E0030 Syntax error "syntax error at 'OERROR'"
D:\MIHARB~1\SVNDOL~1\samples\connto.prg(82) Error E0030 Syntax error "syntax error at 'END'"

Uso UEStudio, mi plantilla es la siguiente (por favor la pueden chequear), aunque he compilado algunos samples sencillo de la carpeta FWH, como dije en el primer post
Code (fw): Select all Collapse
# --------- Harbour y FWH configuration --------
# --- general --------------------------------------
# $P 聽- project name
# $Pp - path to project directory
# $Pn - project name
# --- compile --------------------------------------
# $I 聽- input full name
# $Ip - input path
# $In - input name
# $Ie - input extension
# $O 聽- output file
# $Op - path to output file
# $On - output filename (without path)
# $Oe - output extension
# $R 聽- release/debug setting for compiler
# --- build ----------------------------------------
# $T 聽- target full name
# $Tp - target path
# $Tn - target name
# $O 聽- output file
# $Op - path to output file
# $On - output filename (without path)
# $Oe - output extension
# $R 聽- release/debug setting for linker

[Settings]
Target =
Category&01 = DEFAULT RUN CONFIGURATION
Working Directory =.
Command Line Arguments =

Category&02 = Harbour Options
Automatic Memvar Declaration = no|yes
Variables Are Assumed = no|yes
Generate Preprocessed Output = no|yes
Warning Level = 1|2|3|4|0
User Include Path =
User Defines =

Compiler Options =
Linker Options =

Excluded Files = Excludes

[SettingsInfo]
Target = Provides a space for you to specify an output file and location of the program that the linker creates.
Working Directory = Provides a space for you to specify the directory in which executing occurs. If you do not specify a directory, executing occurs in the directory where the executable is located.
Command Line Arguments = Provides a space for you to specify command-line arguments you want to pass to the program at startup.
Compiler Options = Provides a space for you to specify an additional compiler options.
User Defines = Shows the switches the tool will use to build. Use ';' as delimiter.
Linker Options = Provides a space for you to specify an additional linker options.
Excluded Files = This will exclude the file(s) included in this UE project group from the build.

[SettingsReps]
User Defines = @[;|-D%s]
Automatic Memvar Declaration = no=|yes=/a
Variables Are Assumed = no=|yes=/v
Generate Preprocessed Output = no=|yes=/p
User Include Path = ^^@[;|;%s]
User Include Path&1 = ^^@[;| /i%s]
Use Multi Thread Library = no|yes
Warning Level = @/w%s

[Variables]
HPATH = d:\Harbour
FWH 聽 = d:\Harbour\FWH
CPATH = d:\bcc582

HPATHL = $(HPATH)\LIB
CPATHL = $(CPATH)\LIB

HOPT = /n /gc0 /q $(Compiler Options) /i$(HPATH)\INCLUDE;$(HPATH)\3INCLUDE $(User Include Path&1) $(User Defines) $(Automatic Memvar Declaration) $(Variables Are Assumed) $(Generate Preprocessed Output) $(Warning Level)
COPT = -O2 -M -c -v -I$(HPATH)\INCLUDE

LOPT = -Gn -aa -Tpe -s -v
# Pendientes $(HPATH)\3LIB\emege32.lib $(HPATH)\3LIB\HbTdbf.lib $(HPATH)\3LIB\TSBtn70.lib $(HPATH)\3LIB\TBtnGet.lib $(HPATH)\3LIB\FileXLSxH.lib $(HPATH)\3LIB\Ace32.lib $(HPATH)\3LIB\dolphin.lib $(HPATH)\3LIB\MariaDB\libMysql.lib $(HPATH)\3LIB\MariaDB\TSQLE1.lib
LIBS0 = $(FWH)\LIB\FiveH.lib $(FWH)\LIB\FiveHC.lib
LIBS1 = $(HPATH)\3LIB\libmysql.lib $(HPATH)\3LIB\libmysqld.lib $(HPATH)\3LIB\dolphin.lib
LIBS2 = $(HPATHL)\hbwin.lib $(HPATHL)\gtgui.lib $(HPATHL)\hbrtl.lib $(HPATHL)\hbvm.lib $(HPATHL)\hblang.lib $(HPATHL)\hbmacro.lib $(HPATHL)\hbrdd.lib $(HPATHL)\rddntx.lib $(HPATHL)\rddcdx.lib $(HPATHL)\rddfpt.lib $(HPATHL)\hbsix.lib
LIBS3 = $(HPATHL)\hbdebug.lib $(HPATHL)\hbcommon.lib $(HPATHL)\hbpp.lib $(HPATHL)\hbcpage.lib $(HPATHL)\hbcplr.lib $(HPATHL)\hbct.lib $(HPATHL)\hbpcre.lib $(HPATHL)\xhb.lib $(HPATHL)\hbziparc.lib $(HPATHL)\hbmzip.lib $(HPATHL)\hbzlib.lib $(HPATHL)\minizip.lib $(HPATHL)\png.lib $(HPATHL)\hbcurl.lib $(HPATHL)\hbusrrdd.lib $(FWH)\LIB\libcurl.lib
LIBS4 = $(CPATHL)\cw32.lib $(CPATHL)\uuid.lib $(CPATHL)\ws2_32.lib $(CPATHL)\import32.lib $(CPATHL)\psdk\odbc32.lib $(CPATHL)\psdk\nddeapi.lib $(CPATHL)\psdk\iphlpapi.lib $(CPATHL)\psdk\msimg32.lib $(CPATHL)\psdk\psapi.lib $(CPATHL)\psdk\rasapi32.lib $(CPATHL)\psdk\gdiplus.lib $(CPATHL)\psdk\shell32.lib
LIBS 聽= $(LIBS0) $(LIBS1) $(LIBS2) $(LIBS3) $(LIBS4)

[Environment]
PATH = $(HPATH)\BIN;$(CPATH)\BIN;%PATH%
INCLUDE = $(HPATH)\INCLUDE;$(CPATH)\INCLUDE;$(FWH)\INCLUDE
LIB = $(HPATH)\LIB;$(CPATH)\LIB
BuildMode = %UESMode%

[General]
TargetExt = .EXE
ReleaseOut = Release
DebugOut = Debug
UseFullPaths = 1
UseDosNames = 1
Excludes = $(Excluded Files)
GenerateEDGroup=$(External Dependencies)
.CPP = .C

[MakeCommands]
run = Execute Application
makef = Show Makefile

[Execute Application]
Title = Execute $T
Cmd0 = $(Command Line Arguments)
Depends = $T
ShowWindow = 1
DisplayConsole = $(DCon)

[Show Makefile]
Title=Show makefile
Cmd0=uestudio makefile
ShowWindow=1
DisplayConsole=0

[InsertFiles]

[FileGroups]
FGO = .obj;
FGR = .res;
FGL = .lib;
FGD = .def;

[GroupFormats]
FGO = %s
FGR = %s
FGL = %s

[Build]
Out = $T
Depends = $FGO $FGR
DebugFlag =
ReleaseFlag =
Cmd0 = ilink32 $(LOPT) c0w32.obj $FGO, $T,, $(LIBS),, $FGR

[.PRG]
Out = $In.c
DebugFlag =
ReleaseFlag =
Cmd0 = harbour $I $(HOPT) $R /o$O

IncFiles = 1
CaseSensitive = 0
IncDirs = .;$(INCLUDE);
IncKeyWords = #include;
Comments = /*.*/.//.eol.

[.C]
Out = $In.obj
Cmd0 = bcc32 $(COPT) -o$O $I

[.RC]
Out = $In.res
Cmd0 = brc32 -r -fo$O $I

IncFiles = 1
CaseSensitive = 0
IncDirs = .;$(INCLUDE);
IncKeyWords = #include;
Comments = /*.*/.//.eol.

gracias
Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina