FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour how to distinguish xhb.org or xhb.com with ifdef
Posts: 22
Joined: Mon May 19, 2008 08:54 PM
how to distinguish xhb.org or xhb.com with ifdef
Posted: Tue Sep 16, 2008 07:32 PM
Hi guys,

I started to migrate my system to work under xhb.com and sqlrdd, but I have to keep my old sql connection code, because for my clients who still using my old system version i must keep the support and i dont wanna separate my code for each version of xharbour.
So for do that i thought about distinguish in my code with ifdef...some think like this:

   #ifdef __HARBOUR_COM__
      //sqlrdd connection
   #else
      //old sql connection 
   #endif


Someone Has any idea how to distinguish that ?

thanks!
regards,



Diego Imenes
Posts: 246
Joined: Sat Mar 03, 2007 08:42 PM
Re: how to distinguish xhb.org or xhb.com with ifdef
Posted: Wed Sep 17, 2008 06:49 AM
dempty wrote:I started to migrate my system to work under xhb.com and sqlrdd, but I have to keep my old sql connection code, because for my clients who still using my old system version i must keep the support and i dont wanna separate my code for each version of xharbour.
So for do that i thought about distinguish in my code with ifdef...some think like this:

   #ifdef __HARBOUR_COM__
      //sqlrdd connection
   #else
      //old sql connection 
   #endif


Someone Has any idea how to distinguish that ?

thanks!

Sorry, there is no __XHARBOUR_COM as xHarbour Builder uses xHarbour's core engines. I would add a define of my own like this:

#define __SQLRDD__

Than:

#ifdef __SQLRDD__
...
#endif

Patrick

Continue the discussion