HB_FUNC_INITSTATICS

HB_FUNC_INITSTATICS

Postby fp » Thu Mar 16, 2006 5:59 pm

I've just downloaded xHB-Prof. March 2006 and now I'm recompiling all prg-files and get the following errors in all files, who contain classes, written with FWH.

Undeclared identifier 'hb_INITSTATICS"
Missing prototype for 'HB_FUNC_INITSTATICS'


What's wrong?

The errors occur while compiling with xHb 0.99.61 from xHb-march-professionell

Regards
Frank
Frank-Peter
User avatar
fp
 
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Postby Antonio Linares » Thu Mar 16, 2006 9:19 pm

Frank,

Please try to compile this sample:
Code: Select all  Expand view  RUN
#include "hbclass.ch"

CLASS Test

ENDCLASS
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 fp » Fri Mar 17, 2006 6:42 am

Hi Antonio,

that is the result

\xhb\bin\xhb test -n -m -w -es2

Code: Select all  Expand view  RUN
xHarbour Compiler build 0.99.61 (SimpLex)
Copyright 1999-2006, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'test.prg'...

Lines 42, Functions/Procedures 1
Generating C source output to 'test.c'...
Generating object output to 'test.obj'...
test.c(15): warning: Missing type specifier.

test.c(36): error: Undeclared identifier 'hb_INITSTATICS'.

test.c(36): warning: Conversion from 'void __cdecl function(void) *' to 'int' is undefined.

test.c(36): error: Initializer must be constant.

test.c(113): warning: Missing type specifier.

test.c(114): warning: Missing prototype for 'HB_FUNC_INITSTATICS'.

test.c(123): warning: Missing return value.



With xHb.Febr. 0.99.60 it's okay

And this is the C-Code:
Code: Select all  Expand view  RUN
*
* xHarbour build 0.99.61 Intl. (SimpLex)
* Generated C source code from <test.prg>
* Command: \xhb\bin\xhb test /m /n /w /es
* Created: 2006.03.17 07:35:43 (Pelles ISO C Compiler 2.70)
*/

#include "hbvmpub.h"
#include "hbpcode.h"
#include "hbinit.h"

#define __PRG_SOURCE__ "test.prg"

HB_FUNC( TEST );
HB_FUNC_INITSTATICS();
HB_FUNC_EXTERN( HBCLASS );
HB_FUNC_EXTERN( __CLS_PARAM );
HB_FUNC_EXTERN( __CLSINST );
HB_FUNC_EXTERN( PCOUNT );
HB_FUNC_EXTERN( HB_APARAMS );

#undef HB_PRG_PCODE_VER
#define HB_PRG_PCODE_VER 7

HB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_TEST )
{ "TEST", {HB_FS_PUBLIC | HB_FS_LOCAL | HB_FS_FIRST}, {HB_FUNCNAME( TEST )}, NULL },
{ "NEW", {HB_FS_PUBLIC | HB_FS_MEMVAR | HB_FS_MESSAGE}, {NULL}, NULL },
{ "HBCLASS", {HB_FS_PUBLIC}, {HB_FUNCNAME( HBCLASS )}, NULL },
{ "__CLS_PARAM", {HB_FS_PUBLIC}, {HB_FUNCNAME( __CLS_PARAM )}, NULL },
{ "CREATE", {HB_FS_PUBLIC | HB_FS_MEMVAR | HB_FS_MESSAGE}, {NULL}, NULL },
{ "HCLASS", {HB_FS_PUBLIC | HB_FS_MEMVAR | HB_FS_MESSAGE}, {NULL}, NULL },
{ "__CLSINST", {HB_FS_PUBLIC}, {HB_FUNCNAME( __CLSINST )}, NULL },
{ "PCOUNT", {HB_FS_PUBLIC}, {HB_FUNCNAME( PCOUNT )}, NULL },
{ "CONSTRUCTORCALL", {HB_FS_PUBLIC | HB_FS_MEMVAR | HB_FS_MESSAGE}, {NULL}, NULL },
{ "HB_APARAMS", {HB_FS_PUBLIC}, {HB_FUNCNAME( HB_APARAMS )}, NULL },
{ "(_INITSTATICS)", {HB_FS_INITEXIT}, {hb_INITSTATICS}, NULL }
HB_INIT_SYMBOLS_END( hb_vm_SymbolInit_TEST )

#if defined(HB_PRAGMA_STARTUP)
   #pragma startup hb_vm_SymbolInit_TEST
#elif defined(HB_MSC_STARTUP)
   #if _MSC_VER >= 1010
      #pragma data_seg( ".CRT$XIY" )
      #pragma comment( linker, "/Merge:.CRT=.data" )
   #else
      #pragma data_seg( "XIY" )
   #endif
   static HB_$INITSYM hb_vm_auto_SymbolInit_TEST = hb_vm_SymbolInit_TEST;
   #pragma data_seg()
#endif

HB_FUNC( TEST )
{
   static const BYTE pcode[] =
   {
   HB_P_FRAME, 2, 255,   /* locals, params */
   HB_P_SFRAME, 10, 0,   /* symbol (_INITSTATICS) */
   HB_P_LOCALNEARSETINT, 2, 1, 0,   /* NSCOPE 1*/
   HB_P_PUSHSTATIC, 1, 0,   /* S_OCLASS */

Regards
Frank
Frank-Peter
User avatar
fp
 
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Postby Antonio Linares » Fri Mar 17, 2006 6:44 am

Frank,

I would suggest you to reinstall xHB and to double check that you are using the right header files.
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 fp » Fri Mar 17, 2006 8:12 am

Antonio,

sorry, my mistake ... there still was an header file from your March-xHarbour.

thanks and regards
Frank-Peter
User avatar
fp
 
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Postby Antonio Linares » Fri Mar 17, 2006 8:39 am

Frank,

good to know you got it working :)
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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 35 guests