The problem is only with xHarbour but not with Harbour.
I modified buildx.bat 's harbour compilation like this.
%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /w /gc3 /p %2 %3 > comp.log
My prg code:
#include "FiveWin.Ch"
function Main()
msginfo( '/gc3' )
return ( 0 )
//------------------------------------------------------------------//
This is the warning.
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
/*
* 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();
}