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

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

Postby driessen » Tue Apr 22, 2008 1: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Antonio Linares » Tue Apr 22, 2008 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Tue Apr 22, 2008 1:33 pm

Michel,

Temporarly please try to add this code to your main PRG:
Code: Select all  Expand view  RUN
#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: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Tue Apr 22, 2008 1:41 pm

This is a better version, but still has a missing symbol:
Code: Select all  Expand view  RUN
#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: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Tue Apr 22, 2008 1:42 pm

Ok, this seems to be a good one:
Code: Select all  Expand view  RUN
#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
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby driessen » Tue Apr 22, 2008 1: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Antonio Linares » Tue Apr 22, 2008 1:52 pm

Michel,

I can not ensure the results but try this change in xharbour\include\classes.h:
Code: Select all  Expand view  RUN
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: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Tue Apr 22, 2008 2: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby driessen » Tue Apr 22, 2008 2: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Antonio Linares » Tue Apr 22, 2008 2: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby patrickmast » Sat Apr 26, 2008 6: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
User avatar
patrickmast
 
Posts: 39
Joined: Tue Jan 24, 2006 6:16 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 64 guests