FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour C into PRG problem-RESOLVED
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
C into PRG problem-RESOLVED
Posted: Tue Aug 17, 2021 03:45 AM
Hi

When I maintain my old application.
xHarbour v1.2.3 / FWH1312

I have C code in PRG below:

Code (fw): Select all Collapse
#pragma BEGINDUMP

   #include "windows.h"

   int  WINAPI PEA_SamExeNhiQuery(LPSTR cHostname, int nPort, LPSTR cBuscode, int nCom, LPSTR cDocid, LPSTR cPatdid, LPSTR cPatbirth);
   void WINAPI PEA_GetMsg(LPSTR cBuffer,int * nLen );

   HB_FUNC( PEA_SAMEXENHIQUERY )
   {
     LPSTR  cHostname = hb_parc(1) ;
     int    nPort     = hb_parni(2);
     LPSTR  cBuscode  = hb_parc(3) ;
     int    nCom      = hb_parni(4);
     LPSTR  cDocid    = hb_parc(5) ;
     LPSTR  cPatdid   = hb_parc(6) ;
     LPSTR  cPatbirth = hb_parc(7) ;
     int    nErrCode ;

     nErrCode = PEA_SamExeNhiQuery(cHostname,nPort,cBuscode,nCom,cDocid,cPatdid,cPatbirth ) ;

     hb_retni( nErrCode );
   }

   HB_FUNC( PEA_GETMSG )
   {
     LPSTR  cBuffer = hb_parc(1);
     long   nLen    = hb_parni(2);
     PEA_GetMsg( cBuffer, &nLen );
   }

#pragma ENDDUMP


When I compile it. appear error message below:

hb_retni( nErrCode ); Undefined symbol 'hb_stackST'

Any suggestion?
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 1515
Joined: Thu Oct 30, 2008 02:37 PM
Re: C into PRG problem
Posted: Tue Aug 17, 2021 06:27 AM
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: C into PRG problem
Posted: Tue Aug 17, 2021 03:30 PM
Code (fw): Select all Collapse
#pragma BEGINDUMP

   #include "windows.h"
   #include "hbapi.h"
   ...
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: C into PRG problem
Posted: Thu Aug 19, 2021 07:22 AM
carlos vargas wrote:
Code (fw): Select all Collapse
#pragma BEGINDUMP

   #include "windows.h"
   #include "hbapi.h"
   ...


I will try it again. Thank you so much.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: C into PRG problem
Posted: Thu Aug 19, 2021 07:22 AM
hmpaquito wrote:https://comp.lang.xharbour.narkive.com/ixJp2vGG/compilation-problemm


Thanks for your good information.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: C into PRG problem
Posted: Thu Aug 19, 2021 10:43 AM

A better way is:

#include <windows.h>
#include <hbapi.h>

Means to look for them in the include paths

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: C into PRG problem
Posted: Tue Aug 24, 2021 09:36 AM
Antonio Linares wrote:A better way is:

#include <windows.h>
#include <hbapi.h>

Means to look for them in the include paths


Antonio,

Solved! Thank you.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit

Continue the discussion