FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Compiling roundrec.c for harbour
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Compiling roundrec.c for harbour
Posted: Wed Sep 26, 2012 01:57 PM
Converting a big application to harbour i have problems with :
roundrec.c
Code (fw): Select all Collapse
/* TSLines Class, rounded rectangle paint routine
   Author: Manuel Mercado
   January 1st, 2002 */

#define __HARBOUR__

#include <WinTen.h>
#include <Windows.h>
#include <ClipApi.h>
//---------------------------------------------------------------------------//
#ifndef __HARBOUR__
   CLIPPER RECTROUND( PARAMS ) // ( hDC, nLeft, nTop, nRight, nBottom,
                               //   nWidth, nHeight )
#else
   HARBOUR HB_FUN_RECTROUND( PARAMS )
#endif

{
   _retl( RoundRect( ( HDC ) _parni( 1 ), _parni( 2 ), _parni( 3 ), _parni( 4 ),
                     _parni( 5 ), _parni( 6 ), _parni( 7 ) ) ) ;
}


Errors :
Error E2238 B:\HB31\Include\clipdefs.h 84: Multiple declaration for 'WORD'
Error E2344 B:\BCC582\Include\windef.h 155: Earlier declaration of 'WORD'
Error E2238 B:\HB31\Include\clipdefs.h 86: Multiple declaration for 'PWORD'
Error E2344 B:\BCC582\Include\windef.h 164: Earlier declaration of 'PWORD'
Error E2238 B:\HB31\Include\clipdefs.h 106: Multiple declaration for 'BOOL'
Error E2344 B:\BCC582\Include\windef.h 153: Earlier declaration of 'BOOL'
Error E2238 B:\HB31\Include\clipdefs.h 109: Multiple declaration for 'PBOOL'
Error E2344 B:\BCC582\Include\windef.h 158: Earlier declaration of 'PBOOL'
Error E2238 B:\HB31\Include\clipdefs.h 118: Multiple declaration for 'HANDLE'
Error E2344 B:\BCC582\Include\winnt.h 335: Earlier declaration of 'HANDLE'
test
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Compiling roundrec.c for harbour
Posted: Wed Sep 26, 2012 02:17 PM
Code (fw): Select all Collapse
#include <hbapi.h>
#include <windows.h>

HB_FUNC( ROUNDRECT )
{
   hb_retl( RoundRect( ( HDC ) hb_parnl( 1 ), hb_parnl( 2 ), hb_parnl( 3 ), hb_parnl( 4 ),
                     hb_parnl( 5 ), hb_parnl( 6 ), hb_parnl( 7 ) ) ) ;
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: Compiling roundrec.c for harbour
Posted: Wed Sep 26, 2012 04:27 PM

Antonio ,

Thanks , but still warnings :

Warning W8065 roundrec.c 15: Call to function 'hb_parnl' with no prototype in function HB_FUNC
Warning W8065 roundrec.c 16: Call to function 'hb_parnl' with no prototype in function HB_FUNC
Warning W8070 roundrec.c 17: Function should return a value in function HB_FUNC
Warning W8057 roundrec.c 17: Parameter 'ROUNDRECT' is never used in function HB_FUNC

HB_FUNC( ROUNDRECT )
{
hb_retl( RoundRect( ( HDC ) hb_parnl( 1 ), hb_parnl( 2 ), hb_parnl( 3 ), hb_parnl( 4 ),
hb_parnl( 5 ), hb_parnl( 6 ), hb_parnl( 7 ) ) ) ;
}

test
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Compiling roundrec.c for harbour
Posted: Wed Sep 26, 2012 08:55 PM

It seems as you have not included #include <hbapi.h>

is it in scope when you compile ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: Compiling roundrec.c for harbour
Posted: Fri Sep 28, 2012 08:35 AM

Antonio ,

I had also an external .

I downloaded TsButtun and now it is ok.

The batch-file to build the lib must be changed (missing a prg-file )

Frank

test

Continue the discussion