FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Conversion XHARBOUR to HARBOUR
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Conversion XHARBOUR to HARBOUR
Posted: Tue Sep 11, 2012 02:15 PM

Hello ,

I try to make a conversion from xharbour to harbour with a minimum to change in the source.

I found that xhb.lib should be linked in , also xhb.ch should be included in the prg-file.

xhb.ch calls hbcompat.ch . Here it is not clear to me that XHARBOUR must be declared

I suppose that HARBOUR and XHARBOUR should be declared.

Till now i had as problem :

1) GLOBAL EXTERNAL or GLOBAL are not allowed.
A work arround is to use static's and functions wich returns this static's

2) set.ch has in XHARBOUR more extensions , i.e. set(_SET_ERRORLOG ,"Autoclose.log")

All sugestions are welcome

Frank Demont

test
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Conversion XHARBOUR to HARBOUR
Posted: Tue Sep 11, 2012 10:28 PM
Code (fw): Select all Collapse
#include "hbcompat.ch"
#include "common.ch"
#include "dbinfo.ch"
#include "ads.ch"

#include "fivewin.ch"
#include "report.ch"
#include "dbcombo3.ch"
#include "fastreph.ch"
#include "xbrowse.ch"
#include "filexls.ch"
#include "dtpicker.ch"
#include "calendar.ch"

#ifdef __HARBOUR__
   #ifndef __XHARBOUR__
      #include "xhb.ch"
      #include "xhbcls.ch"
      #stdout Compilando con HARBOUR compiler, incluye compatibilidad con XHARBOUR.
   #else
      #ifdef __XCC__
      #else
      #stdout Compilando con XHARBOUR compiler.
      #endif
   #endif
#endif
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: Conversion XHARBOUR to HARBOUR
Posted: Wed Sep 12, 2012 07:30 AM
carlos vargas wrote:
Code (fw): Select all Collapse
#include "hbcompat.ch"
#include "common.ch"
#include "dbinfo.ch"
#include "ads.ch"

#include "fivewin.ch"
#include "report.ch"
#include "dbcombo3.ch"
#include "fastreph.ch"
#include "xbrowse.ch"
#include "filexls.ch"
#include "dtpicker.ch"
#include "calendar.ch"

#ifdef __HARBOUR__
   #ifndef __XHARBOUR__
      #include "xhb.ch"
      #include "xhbcls.ch"
      #stdout Compilando con HARBOUR compiler, incluye compatibilidad con XHARBOUR.
   #else
      #ifdef __XCC__
      #else
      #stdout Compilando con XHARBOUR compiler.
      #endif
   #endif
#endif


Carlos ,

Thanks for the reply. I noticed that combat.ch is called from xhb.ch , also i need a conversion for a program written for xharbour to harbour , so i changed your code as :

Code (fw): Select all Collapse
# ifdef __HARBOUR__
# ifdef __XHARBOUR__
# undef __XHARBOUR__
# endif
# include "xhb.ch"
# include "xhbcls.ch"
# INCLUDE "xset.ch"        // From xharbour , extensions from xharbour 200 ... 211
# endif


Yesterday i reported 2 problems :
1) GLOBAL (EXTERNAL) 2)Set values from xharbour (200 ...)

Now i have another difference between harbour and xharbour
Arr[1] := {"a",1}
ATAIL(Arr[1]) := 2 // Accepted by xharbour , not harbour or clipper

Frank
test
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Conversion XHARBOUR to HARBOUR
Posted: Wed Sep 12, 2012 07:54 AM

Frank,

Try to use Harbour features only. Many xharbour users are migrating to Harbour

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: Conversion XHARBOUR to HARBOUR
Posted: Wed Sep 12, 2012 08:28 AM
Antonio Linares wrote:Frank,

Try to use Harbour features only. Many xharbour users are migrating to Harbour


Antonio

It is a big project (50 prg-files) , a first step is to make litle changes.

Where do i find good documentation from harbour ?

Frank
test
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Conversion XHARBOUR to HARBOUR
Posted: Wed Sep 12, 2012 08:48 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion