error to compile pragma BEGINDUMP ( fwh1512- bcc7)

error to compile pragma BEGINDUMP ( fwh1512- bcc7)

Postby Silvio.Falconi » Thu Jan 14, 2016 6:03 pm

I not understood why it not compile



Code: Select all  Expand view
#pragma BEGINDUMP

#include <windows.h>                                
#include <hbapi.h>                                  
                                                   
HB_FUNC( ROUNDBOX )
{                                                  
   HDC hDC = ( HDC ) hb_parni( 1 );                
   HBRUSH hBrush = ( HBRUSH ) GetStockObject( 5 );  
   HBRUSH hOldBrush = ( HBRUSH ) SelectObject( hDC, hBrush );
   HPEN hPen, hOldPen ;                            
                                                   
   if( hb_pcount() > 8 )                            
      hPen = CreatePen( PS_SOLID, hb_parnl( 9 ), ( COLORREF ) hb_parnl( 8 ) );
   else                                            
      hPen = CreatePen( PS_SOLID, 1, ( COLORREF ) hb_parnl( 8 ) );
                                                   
   hOldPen = ( HPEN ) SelectObject( hDC, hPen );    
   hb_retl( RoundRect( hDC ,                        
                                 hb_parni( 2 ),    
                                 hb_parni( 3 ),    
                                 hb_parni( 4 ),    
                                 hb_parni( 5 ),    
                                 hb_parni( 6 ),    
                                 hb_parni( 7 ) ) );
                                                   
   SelectObject( hDC, hOldBrush );                  
   DeleteObject( hBrush );                          
   SelectObject( hDC, hOldPen );                    
   DeleteObject( hPen );                            
}                                                  
                                                   
#pragma ENDDUMP





errors
Code: Select all  Expand view
Lines 287, Functions/Procedures 7, pCodes 1218
[1]:Bcc32.Exe -M -c -v -DHB_OS_WIN_32 -DHB_FM_STATISTICS_OFF -DHB_NO_DEFAULT_API_MACROS -DHB_NO_DEFAULT_STACK_MACROS -IC:\WORK\fwh\include -IC:\work\bcc7\Include;C:\work\XHARBOUR\Include  -nObj Obj\Ut_brw_old.c
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
Obj\Ut_brw_old.c:
Error E2209 Lib\\xbrowse\\Ut_brw_old.prg 290: Unable to open include file 'windows.h'
Error E2451 Lib\\xbrowse\\Ut_brw_old.prg 295: Undefined symbol 'HDC' in function HB_FUN_ROUNDBOX
Error E2379 Lib\\xbrowse\\Ut_brw_old.prg 295: Statement missing ; in function HB_FUN_ROUNDBOX
Error E2451 Lib\\xbrowse\\Ut_brw_old.prg 296: Undefined symbol 'HBRUSH' in function HB_FUN_ROUNDBOX
Error E2379 Lib\\xbrowse\\Ut_brw_old.prg 296: Statement missing ; in function HB_FUN_ROUNDBOX
Error E2379 Lib\\xbrowse\\Ut_brw_old.prg 297: Statement missing ; in function HB_FUN_ROUNDBOX
Error E2451 Lib\\xbrowse\\Ut_brw_old.prg 298: Undefined symbol 'HPEN' in function HB_FUN_ROUNDBOX
Error E2379 Lib\\xbrowse\\Ut_brw_old.prg 298: Statement missing ; in function HB_FUN_ROUNDBOX
Error E2451 Lib\\xbrowse\\Ut_brw_old.prg 301: Undefined symbol 'hPen' in function HB_FUN_ROUNDBOX
Error E2451 Lib\\xbrowse\\Ut_brw_old.prg 301: Undefined symbol 'PS_SOLID' in function HB_FUN_ROUNDBOX
Error E2451 Lib\\xbrowse\\Ut_brw_old.prg 301: Undefined symbol 'COLORREF' in function HB_FUN_ROUNDBOX
Error E2121 Lib\\xbrowse\\Ut_brw_old.prg 301: Function call missing ) in function HB_FUN_ROUNDBOX
Error E2121 Lib\\xbrowse\\Ut_brw_old.prg 303: Function call missing ) in function HB_FUN_ROUNDBOX
Error E2451 Lib\\xbrowse\\Ut_brw_old.prg 305: Undefined symbol 'hOldPen' in function HB_FUN_ROUNDBOX
Error E2379 Lib\\xbrowse\\Ut_brw_old.prg 305: Statement missing ; in function HB_FUN_ROUNDBOX
Error E2451 Lib\\xbrowse\\Ut_brw_old.prg 312: Undefined symbol 'hDC' in function HB_FUN_ROUNDBOX
Warning W8065 Lib\\xbrowse\\Ut_brw_old.prg 312: Call to function 'RoundRect' with no prototype in function HB_FUN_ROUNDBOX
Error E2451 Lib\\xbrowse\\Ut_brw_old.prg 314: Undefined symbol 'hOldBrush' in function HB_FUN_ROUNDBOX
Warning W8065 Lib\\xbrowse\\Ut_brw_old.prg 314: Call to function 'SelectObject' with no prototype in function HB_FUN_ROUNDBOX
Error E2451 Lib\\xbrowse\\Ut_brw_old.prg 315: Undefined symbol 'hBrush' in function HB_FUN_ROUNDBOX
Warning W8065 Lib\\xbrowse\\Ut_brw_old.prg 315: Call to function 'DeleteObject' with no prototype in function HB_FUN_ROUNDBOX
Warning W8065 Lib\\xbrowse\\Ut_brw_old.prg 316: Call to function 'SelectObject' with no prototype in function HB_FUN_ROUNDBOX
Warning W8065 Lib\\xbrowse\\Ut_brw_old.prg 317: Call to function 'DeleteObject' with no prototype in function HB_FUN_ROUNDBOX
*** 18 errors in Compile ***
 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm

Re: error to compile pragma BEGINDUMP ( fwh1512- bcc7)

Postby Antonio Linares » Thu Jan 14, 2016 6:23 pm

Silvio,

You have to replace this:

-IC:\work\bcc7\Include

with this:

-IC:\work\bcc7\Include\windows\sdk\
regards, saludos

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

Re: error to compile pragma BEGINDUMP ( fwh1512- bcc7)

Postby Silvio.Falconi » Thu Jan 14, 2016 7:37 pm

I not found this parameter
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm

Re: error to compile pragma BEGINDUMP ( fwh1512- bcc7)

Postby Antonio Linares » Thu Jan 14, 2016 7:40 pm

[1]:Bcc32.Exe -M -c -v -DHB_OS_WIN_32 -DHB_FM_STATISTICS_OFF -DHB_NO_DEFAULT_API_MACROS -DHB_NO_DEFAULT_STACK_MACROS -IC:\WORK\fwh\include -IC:\work\bcc7\Include;C:\work\XHARBOUR\Include -nObj Obj\Ut_brw_old.c


From your "errors" post
regards, saludos

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

Re: error to compile pragma BEGINDUMP ( fwh1512- bcc7)

Postby Silvio.Falconi » Thu Jan 14, 2016 7:44 pm

Antonio,
Now I compiled my old application
but on some prg Ihave this error warning

Warning W8019 C:\work\bcc7\Include\windows\sdk\winnt.h 14984: Code has no effect in function TpDestroyCallbackEnviron


for a sample I use a code of Paco on a class made from Paco

Code: Select all  Expand view


//___ manejo de fuentes © Paco García 2006 ____________________________________//

#pragma BEGINDUMP
#include "Windows.h"
#include "hbapi.h"

HB_FUNC( GETDEFAULTFONTNAME )
{
   LOGFONT lf;
   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
   hb_retc( lf.lfFaceName );
}

HB_FUNC( GETDEFAULTFONTHEIGHT )
{
   LOGFONT lf;
   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
   hb_retni( lf.lfHeight );
}

HB_FUNC( GETDEFAULTFONTWIDTH )
{
   LOGFONT lf;
   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
   hb_retni( lf.lfWidth );
}

HB_FUNC( GETDEFAULTFONTITALIC )
{
   LOGFONT lf;
   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
   hb_retl( (BOOL) lf.lfItalic );
}

HB_FUNC( GETDEFAULTFONTUNDERLINE )
{
   LOGFONT lf;
   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
   hb_retl( (BOOL) lf.lfUnderline );
}

HB_FUNC( GETDEFAULTFONTBOLD )
{
   LOGFONT lf;
   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
   hb_retl( (BOOL) ( lf.lfWeight == 700 ) );
}

HB_FUNC( GETDEFAULTFONTSTRIKEOUT )
{
      NONCLIENTMETRICS info;
      HFONT hFont;
      LOGFONT lf;
      info.cbSize = sizeof(info);
      SystemParametersInfo( SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0 );
      hFont = CreateFontIndirect( &info.lfMenuFont );
      GetObject( ( HFONT ) hFont  , sizeof( LOGFONT ), &lf );
      DeleteObject( hFont );
      hb_retl( (BOOL) lf.lfStrikeOut );
}


HB_FUNC( GETDEFAULTFONTNAME2 )
{
      NONCLIENTMETRICS info;
      HFONT hFont;
      LOGFONT lf;
      info.cbSize = sizeof(info);
      SystemParametersInfo( SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0 );
      hFont = CreateFontIndirect( &info.lfMenuFont );
   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
      DeleteObject( hFont );
   hb_retc( lf.lfFaceName );
}

HB_FUNC( GETDEFAULTFONTHEIGHT2 )
{
      NONCLIENTMETRICS info;
      HFONT hFont;
      LOGFONT lf;
      info.cbSize = sizeof(info);
      SystemParametersInfo( SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0 );
      hFont = CreateFontIndirect( &info.lfMenuFont );
      GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
      DeleteObject( hFont );
   hb_retni( lf.lfHeight );
}

HB_FUNC( GETDEFAULTFONTWIDTH2 )
{
      NONCLIENTMETRICS info;
      HFONT hFont;
      LOGFONT lf;
      info.cbSize = sizeof(info);
      SystemParametersInfo( SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0 );
      hFont = CreateFontIndirect( &info.lfMenuFont );
   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
      DeleteObject( hFont );
   hb_retni( lf.lfWidth );
}

HB_FUNC( GETDEFAULTFONTITALIC2 )
{
      NONCLIENTMETRICS info;
      HFONT hFont;
      LOGFONT lf;
      info.cbSize = sizeof(info);
      SystemParametersInfo( SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0 );
      hFont = CreateFontIndirect( &info.lfMenuFont );

   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
      DeleteObject( hFont );
   hb_retl( (BOOL) lf.lfItalic );
}

HB_FUNC( GETDEFAULTFONTUNDERLINE2 )
{
      NONCLIENTMETRICS info;
      HFONT hFont;
      LOGFONT lf;
      info.cbSize = sizeof(info);
      SystemParametersInfo( SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0 );
      hFont = CreateFontIndirect( &info.lfMenuFont );
   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
      DeleteObject( hFont );
   hb_retl( (BOOL) lf.lfUnderline );
}

HB_FUNC( GETDEFAULTFONTBOLD2 )
{
      NONCLIENTMETRICS info;
      HFONT hFont;
      LOGFONT lf;
      info.cbSize = sizeof(info);
      SystemParametersInfo( SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0 );
      hFont = CreateFontIndirect( &info.lfMenuFont );

   GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
      DeleteObject( hFont );
   hb_retl( (BOOL) ( lf.lfWeight == 700 ) );
}

HB_FUNC( GETDEFAULTFONTSTRIKEOUT2 )
{
      NONCLIENTMETRICS info;
      HFONT hFont;
      LOGFONT lf;
      info.cbSize = sizeof(info);
      SystemParametersInfo( SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0 );
      hFont = CreateFontIndirect( &info.lfMenuFont );

      GetObject( ( HFONT ) GetStockObject( DEFAULT_GUI_FONT )  , sizeof( LOGFONT ), &lf );
      DeleteObject( hFont );
      hb_retl( (BOOL) lf.lfStrikeOut );
}


#pragma ENDDUMP
 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm

Re: error to compile pragma BEGINDUMP ( fwh1512- bcc7)

Postby Antonio Linares » Thu Jan 14, 2016 8:20 pm

Silvio,

Please don't use the flag -v when you call bcc32:

bcc32 -M -c ...
regards, saludos

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

Re: error to compile pragma BEGINDUMP ( fwh1512- bcc7)

Postby Silvio.Falconi » Thu Jan 14, 2016 10:21 pm

ok
now I have this warning compiling gdiplus.cpp

Warning W8022 C:\work\bcc7\Include\windows\sdk\GdiplusHeaders.h 636: 'Bitmap::Clone(const Rect &,int)' hides virtual function 'Image::Clone()'
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm

Re: error to compile pragma BEGINDUMP ( fwh1512- bcc7)

Postby Antonio Linares » Fri Jan 15, 2016 9:26 am

You may safely ignore it

Do you get your EXE properly built ?
regards, saludos

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

Re: error to compile pragma BEGINDUMP ( fwh1512- bcc7)

Postby Silvio.Falconi » Fri Jan 15, 2016 9:16 pm

yes it create the exe but it show this warning ..
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 54 guests