FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Tue Apr 22, 2008 01:23 PM

Antonio,

As you mentioned in another topic, I downloaded and installed the bugfix of FWH 8.04 last friday.

Since the bugfix I got an error while linking : "Unresolved external symbol '_HB_FUN___CLSACTIVE".

Can this be solved ASAP ? I'm stuck right now and I am waiting for your answer quite urgently.

Thanks a lot in advance.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Tue Apr 22, 2008 01:30 PM

Michel,

Are you using xHB commercial ?

If yes, you do need a new beta from Patrick Mast

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Tue Apr 22, 2008 01:33 PM
Michel,

Temporarly please try to add this code to your main PRG:
#pragma BEGINDUMP

#include <hbapi.h>
#include <hbapiitm.h>

HB_FUNC( __CLSACTIVE )
{
   // HB_THREAD_STUB_ANY

   USHORT uiClass = ( USHORT ) hb_parni( 1 );
   PHB_ITEM *pBase = hb_stackGetBase( 1 );

   if( pBase && uiClass && uiClass <= s_uiClasses )
   {
      PCLASS pClass = s_pClasses + ( uiClass - 1 );

      if( pClass->pClsSymbol == (*pBase)->item.asSymbol.value )
      {
         pClass->bActive = TRUE;
         hb_retl( TRUE );
         return;
      }
   }
   hb_retl( FALSE );
}

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Tue Apr 22, 2008 01:41 PM
This is a better version, but still has a missing symbol:
#pragma BEGINDUMP 

#include <hbapi.h> 
#include <hbapiitm.h>
#include <hbstack.h> 
#include <classes.h>

USHORT hb_clsMaxClasses( void );

HB_FUNC( __CLSACTIVE ) 
{ 
   // HB_THREAD_STUB_ANY 

   USHORT uiClass = ( USHORT ) hb_parni( 1 ); 
   PHB_ITEM *pBase = hb_stackGetBase( 1 ); 

   if( pBase && uiClass && uiClass <= hb_clsMaxClasses() ) 
   { 
      PCLASS pClass = s_pClasses + ( uiClass - 1 ); 

      if( pClass->pClsSymbol == (*pBase)->item.asSymbol.value ) 
      { 
         pClass->bActive = TRUE; 
         hb_retl( TRUE ); 
         return; 
      } 
   } 
   hb_retl( FALSE ); 
} 

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Tue Apr 22, 2008 01:42 PM
Ok, this seems to be a good one:
#pragma BEGINDUMP 

#include <hbapi.h> 
#include <hbapiitm.h>
#include <hbstack.h> 
#include <classes.h>

USHORT hb_clsMaxClasses( void );
PCLASS hb_clsClassesArray( void );

HB_FUNC( __CLSACTIVE ) 
{ 
   // HB_THREAD_STUB_ANY 

   USHORT uiClass = ( USHORT ) hb_parni( 1 ); 
   PHB_ITEM *pBase = hb_stackGetBase( 1 ); 

   if( pBase && uiClass && uiClass <= hb_clsMaxClasses() ) 
   { 
      PCLASS pClass = hb_clsClassesArray() + ( uiClass - 1 ); 

      if( pClass->pClsSymbol == (*pBase)->item.asSymbol.value ) 
      { 
         pClass->bActive = TRUE; 
         hb_retl( TRUE ); 
         return; 
      } 
   } 
   hb_retl( FALSE ); 
} 

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Tue Apr 22, 2008 01:49 PM

Antonio,

Thanks a lot for such a quick respons.

Indeed I'm using XHB commercial.

Unfortunately I still got an error : "Unknown fiels 'bActive' of 'Class' ".

What now ?

Regards,

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Tue Apr 22, 2008 01:52 PM
Michel,

I can not ensure the results but try this change in xharbour\include\classes.h:
typedef struct
{
...
   BOOL     bActive;

} CLASS, * PCLASS;

add that bActive struct member in CLASS struct definition. As it is the latest member of the struct then we should not break anything...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Tue Apr 22, 2008 02:03 PM

I am afraid it will not work as sizeof( CLASS ) is used in several places in vm\classes.c. It may generate GPFs :-(

Another possible solution is to try these two possible functions:
function __CLSACTIVE() ; return .F.
or
function __CLSACTIVE() ; return .T.

I don't like to provide these "kind" of solutions. The right way is a new beta from xHB commercial :-(

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Tue Apr 22, 2008 02:18 PM

Antonio,

Thanks a lot for trying to help me.

I'll contact Patrick Mast.

Regards,

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Tue Apr 22, 2008 02:21 PM

Michel,

The problem is that __ClsActive() is called from hbclass.ch so ALL classes are requesting that function now.

Maybe you could try to recompile all classes with older hbclass.ch and this may fix it. But we have not tested it here.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 39
Joined: Tue Jan 24, 2006 06:16 PM
Urgent : linking problem after bugfix FWH 8.04 of April 18th
Posted: Sat Apr 26, 2008 06:19 AM
driessen wrote:Antonio,
Thanks a lot for trying to help me.
I'll contact Patrick Mast.
Regards,

Hello Frank,

I'm waiting for some last minute fixes before releasing a new xHarbour Builder Beta.

Patrick

Continue the discussion