Page 1 of 1
HB_FUNC_INITSTATICS
Posted: Thu Mar 16, 2006 5:59 pm
by fp
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
Posted: Thu Mar 16, 2006 9:19 pm
by Antonio Linares
Frank,
Please try to compile this sample:
Code: Select all
#include "hbclass.ch"
CLASS Test
ENDCLASS
Posted: Fri Mar 17, 2006 6:42 am
by fp
Hi Antonio,
that is the result
\xhb\bin\xhb test -n -m -w -es2
Code: Select all
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
*
* 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
Posted: Fri Mar 17, 2006 6:44 am
by Antonio Linares
Frank,
I would suggest you to reinstall xHB and to double check that you are using the right header files.
Posted: Fri Mar 17, 2006 8:12 am
by fp
Antonio,
sorry, my mistake ... there still was an header file from your March-xHarbour.
thanks and regards
Posted: Fri Mar 17, 2006 8:39 am
by Antonio Linares
Frank,
good to know you got it working