C into PRG problem-RESOLVED

Post Reply
User avatar
richard-service
Posts: 808
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 2 times
Contact:

C into PRG problem-RESOLVED

Post by richard-service »

Hi

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

I have C code in PRG below:

Code: Select all | Expand


#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?
Last edited by richard-service on Tue Aug 24, 2021 9:37 am, edited 1 time in total.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
carlos vargas
Posts: 1723
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: C into PRG problem

Post by carlos vargas »

Code: Select all | Expand


#pragma BEGINDUMP

   #include "windows.h"
   #include "hbapi.h"
   ...
 
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
richard-service
Posts: 808
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 2 times
Contact:

Re: C into PRG problem

Post by richard-service »

carlos vargas wrote:

Code: Select all | Expand


#pragma BEGINDUMP

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


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

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
Posts: 808
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 2 times
Contact:

Re: C into PRG problem

Post by richard-service »

hmpaquito wrote:https://comp.lang.xharbour.narkive.com/ixJp2vGG/compilation-problemm


Thanks for your good information.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
Antonio Linares
Site Admin
Posts: 42603
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 43 times
Been thanked: 88 times
Contact:

Re: C into PRG problem

Post by Antonio Linares »

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
User avatar
richard-service
Posts: 808
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 2 times
Contact:

Re: C into PRG problem

Post by richard-service »

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 (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
Post Reply