Conversion XHARBOUR to HARBOUR

Conversion XHARBOUR to HARBOUR

Postby Franklin Demont » Tue Sep 11, 2012 2: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
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: Conversion XHARBOUR to HARBOUR

Postby carlos vargas » Tue Sep 11, 2012 10:28 pm

Code: Select all  Expand view

#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)
User avatar
carlos vargas
 
Posts: 1688
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Conversion XHARBOUR to HARBOUR

Postby Franklin Demont » Wed Sep 12, 2012 7:30 am

carlos vargas wrote:
Code: Select all  Expand view

#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: Select all  Expand view

# 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
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: Conversion XHARBOUR to HARBOUR

Postby Antonio Linares » Wed Sep 12, 2012 7:54 am

Frank,

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

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

Re: Conversion XHARBOUR to HARBOUR

Postby Franklin Demont » Wed Sep 12, 2012 8: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
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: Conversion XHARBOUR to HARBOUR

Postby Antonio Linares » Wed Sep 12, 2012 8:48 am

regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 26 guests