Compiler warning in FWH9.8

Compiler warning in FWH9.8

Postby byte-one » Fri Dec 25, 2009 12:28 pm

Antonio, if i compile with parameter -gc3 (pure c-Output) i become the compiler warning for every function in the PRG:

Warning W8065 .\MyPRG.hrb: Call to function "hb_xvmExitProc" with no prototype in function HB_FUN_Myfunction

In earlier versons of FWH all is ok.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Compiler warning in FWH9.8

Postby Antonio Linares » Sat Dec 26, 2009 12:53 am

Günther,

Thats a Harbour related issue. It is not related to FWH:

hb_xvmExitProc is defined in c:\harbour\include\hbxvm.h as:
extern HB_EXPORT void hb_xvmExitProc( void );

Please check that you are using the right hbxvm.h and that such file is included in the generated C file
regards, saludos

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

Re: Compiler warning in FWH9.8

Postby byte-one » Sun Dec 27, 2009 11:02 pm

Antonio, i use for years the compiler option -gc3! Everytime all was ok and the programs run up to 25% faster! In the last FWH versions (or (x)harbour) this error appears.
But i will test to extra include this headerfile and send the result.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Compiler warning in FWH9.8

Postby Antonio Linares » Mon Dec 28, 2009 10:04 am

Günther,

Here you can find the most recent Harbourm and xHarbour builds:

viewtopic.php?f=16&t=2486&p=92385#p92385
regards, saludos

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

Re: Compiler warning in FWH9.8

Postby byte-one » Sat Jan 02, 2010 1:48 pm

Antonio, I found that this error are shown only, if an own or modified class is to be compile and link!!
In my programm i use a modified xbrowse-class but also other own classes produce this warning.

But only with compiler switch -gc3!!!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Compiler warning in FWH9.8

Postby Antonio Linares » Sat Jan 02, 2010 10:42 pm

Günther,

Please post here the resulting .C file that you get when you use the -gc3 switch, thanks

Please use a small PRG example, so it is not too large.
regards, saludos

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

Re: Compiler warning in FWH9.8

Postby nageswaragunupudi » Sun Jan 03, 2010 1:41 am

The problem is only with xHarbour but not with Harbour.
I modified buildx.bat 's harbour compilation like this.
Code: Select all  Expand view
%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /w /gc3 /p %2 %3 > comp.log

My prg code:
Code: Select all  Expand view
#include "FiveWin.Ch"

function Main()

   msginfo( '/gc3' )

return ( 0 )
//------------------------------------------------------------------//
 

This is the warning.
Code: Select all  Expand view
Generating C source output to 't.c'...
Done.
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
t.c:
Warning W8065 t.c 67: Call to function 'hb_xvmExitProc' with no prototype in function HB_FUN_MAIN
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
* Application successfully built *
 

Here is the c code generated
Code: Select all  Expand view
/*
 * xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6406)
 * Generated C source code from <t.prg>
 * Command: t /n /i.\..\include;c:\xharbour\include /w /gc3 /p
 * Created: 2010.01.03 07:10:21 (Borland C++ 5.5.1 (32 bit))
 */


#include "hbvmpub.h"
#include "hbxvm.h"
#include "hbapierr.h"
#include "hbinit.h"

#define __PRG_SOURCE__ "t.prg"

HB_FUNC( MAIN );

/* Skipped DEFERRED call to: 'DIVERTCONSTRUCTORCALL' */
HB_FUNC_EXTERN( GETPROCADD );
HB_FUNC_EXTERN( TACTIVEX );
HB_FUNC_EXTERN( ERRORSYS );
HB_FUNC_EXTERN( MSGINFO );

#undef HB_PRG_PCODE_VER
#define HB_PRG_PCODE_VER 10

#include "hbapi.h"

HB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_T )
{ "DIVERTCONSTRUCTORCALL", {HB_FS_PUBLIC | HB_FS_DEFERRED}, {NULL}, NULL },
{ "GETPROCADD", {HB_FS_PUBLIC}, {HB_FUNCNAME( GETPROCADD )}, NULL },
{ "TACTIVEX", {HB_FS_PUBLIC}, {HB_FUNCNAME( TACTIVEX )}, NULL },
{ "ERRORSYS", {HB_FS_PUBLIC}, {HB_FUNCNAME( ERRORSYS )}, NULL },
{ "MAIN", {HB_FS_PUBLIC | HB_FS_LOCAL | HB_FS_FIRST}, {HB_FUNCNAME( MAIN )}, &ModuleFakeDyn },
{ "MSGINFO", {HB_FS_PUBLIC}, {HB_FUNCNAME( MSGINFO )}, NULL }
HB_INIT_SYMBOLS_END( hb_vm_SymbolInit_T )

#if defined(__ICL)
   #pragma warning(disable:177)
#endif

#if defined(HB_PRAGMA_STARTUP)
   #pragma startup hb_vm_SymbolInit_T
#elif defined(HB_MSC_STARTUP)
   #if defined( HB_OS_WIN_64 )
      #pragma section( HB_MSC_START_SEGMENT, long, read )
   #endif
   #pragma data_seg( HB_MSC_START_SEGMENT )
   static HB_$INITSYM hb_vm_auto_SymbolInit_T = hb_vm_SymbolInit_T;
   #pragma data_seg()
#endif

HB_FUNC( MAIN )
{

   do {
    hb_xvmBaseLine( 18 );
    hb_xvmPushSymbol( symbols + 5 );
    hb_xvmPushNil();
    hb_xvmPushStringConst( "/gc3", 4 );
    if( hb_xvmDo( 1 ) ) break;
    hb_xvmLineOffset( 2 );
    hb_xvmPushInteger( 0 );
    hb_xvmRetValue();
    /* *** END PROC *** */
   } while ( 0 );

   hb_xvmExitProc();
}
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10313
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Compiler warning in FWH9.8

Postby nageswaragunupudi » Sun Jan 03, 2010 1:47 am

Here is the c code generated without any /g[ ] switch. Generated with buildx.bat
Code: Select all  Expand view
/*
 * xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6406)
 * Generated C source code from <t.prg>
 * Command: t /n /i.\..\include;c:\xharbour\include /w /p
 * Created: 2010.01.03 07:14:59 (Borland C++ 5.5.1 (32 bit))
 */


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

#define __PRG_SOURCE__ "t.prg"

HB_FUNC( MAIN );

/* Skipped DEFERRED call to: 'DIVERTCONSTRUCTORCALL' */
HB_FUNC_EXTERN( GETPROCADD );
HB_FUNC_EXTERN( TACTIVEX );
HB_FUNC_EXTERN( ERRORSYS );
HB_FUNC_EXTERN( MSGINFO );

#undef HB_PRG_PCODE_VER
#define HB_PRG_PCODE_VER 10

#include "hbapi.h"

HB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_T )
{ "DIVERTCONSTRUCTORCALL", {HB_FS_PUBLIC | HB_FS_DEFERRED}, {NULL}, NULL },
{ "GETPROCADD", {HB_FS_PUBLIC}, {HB_FUNCNAME( GETPROCADD )}, NULL },
{ "TACTIVEX", {HB_FS_PUBLIC}, {HB_FUNCNAME( TACTIVEX )}, NULL },
{ "ERRORSYS", {HB_FS_PUBLIC}, {HB_FUNCNAME( ERRORSYS )}, NULL },
{ "MAIN", {HB_FS_PUBLIC | HB_FS_LOCAL | HB_FS_FIRST}, {HB_FUNCNAME( MAIN )}, &ModuleFakeDyn },
{ "MSGINFO", {HB_FS_PUBLIC}, {HB_FUNCNAME( MSGINFO )}, NULL }
HB_INIT_SYMBOLS_END( hb_vm_SymbolInit_T )

#if defined(__ICL)
   #pragma warning(disable:177)
#endif

#if defined(HB_PRAGMA_STARTUP)
   #pragma startup hb_vm_SymbolInit_T
#elif defined(HB_MSC_STARTUP)
   #if defined( HB_OS_WIN_64 )
      #pragma section( HB_MSC_START_SEGMENT, long, read )
   #endif
   #pragma data_seg( HB_MSC_START_SEGMENT )
   static HB_$INITSYM hb_vm_auto_SymbolInit_T = hb_vm_SymbolInit_T;
   #pragma data_seg()
#endif

HB_FUNC( MAIN )
{
   static const BYTE pcode[] =
   {
/* 00000 */ HB_P_BASELINE, 18, 0,   /* 18 */
    HB_P_PUSHSYMNEAR, 5,    /* MSGINFO */
    HB_P_PUSHNIL,
    HB_P_PUSHSTRSHORT, 5,   /* 5 */
    '/', 'g', 'c', '3', 0,
    HB_P_DOSHORT, 1,
/* 00015 */ HB_P_LINEOFFSET, 2/* 20 */
    HB_P_ZERO,
    HB_P_RETVALUE,
    HB_P_ENDPROC
/* 00020 */
   };

   hb_vmExecute( pcode, symbols );
}
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10313
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Compiler warning in FWH9.8

Postby Antonio Linares » Sun Jan 03, 2010 7:27 am

Rao,

Thanks for the example :-)

There is a little error in xharbour\include\hbxvm.h. Just modify this line:

extern HB_EXPORT void hb_xvmExitProc();

this way:

extern HB_EXPORT void hb_xvmExitProc( void );

and the warning is solved :-)
regards, saludos

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

Re: Compiler warning in FWH9.8

Postby nageswaragunupudi » Sun Jan 03, 2010 9:32 am

Thanks
Problem solved
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10313
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 39 guests