Urgent : linking problem after bugfix FWH 8.04 of April 18th

Post Reply
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Urgent : linking problem after bugfix FWH 8.04 of April 18th

Post by driessen »

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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Michel,

Are you using xHB commercial ?

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

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

Post by Antonio Linares »

Michel,

Temporarly please try to add this code to your main PRG:

Code: Select all

#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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

This is a better version, but still has a missing symbol:

Code: Select all

#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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Ok, this seems to be a good one:

Code: Select all

#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
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Post by driessen »

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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Michel,

I can not ensure the results but try this change in xharbour\include\classes.h:

Code: Select all

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Post by driessen »

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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
patrickmast
Posts: 39
Joined: Tue Jan 24, 2006 6:16 pm
Contact:

Post by patrickmast »

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
Post Reply