Compiling roundrec.c for harbour

Compiling roundrec.c for harbour

Postby Franklin Demont » Wed Sep 26, 2012 1:57 pm

Converting a big application to harbour i have problems with :
roundrec.c
Code: Select all  Expand view

/* 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
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: Compiling roundrec.c for harbour

Postby Antonio Linares » Wed Sep 26, 2012 2:17 pm

Code: Select all  Expand view


#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Compiling roundrec.c for harbour

Postby Franklin Demont » Wed Sep 26, 2012 4: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
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: Compiling roundrec.c for harbour

Postby Antonio Linares » Wed Sep 26, 2012 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Compiling roundrec.c for harbour

Postby Franklin Demont » Fri Sep 28, 2012 8: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
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 112 guests