C into PRG problem-RESOLVED

C into PRG problem-RESOLVED

Postby richard-service » Tue Aug 17, 2021 3:45 am

Hi

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

I have C code in PRG below:

Code: Select all  Expand view

#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
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: C into PRG problem

Postby hmpaquito » Tue Aug 17, 2021 6:27 am

hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: C into PRG problem

Postby carlos vargas » Tue Aug 17, 2021 3:30 pm

Code: Select all  Expand view

#pragma BEGINDUMP

   #include "windows.h"
   #include "hbapi.h"
   ...
 
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1719
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: C into PRG problem

Postby richard-service » Thu Aug 19, 2021 7:22 am

carlos vargas wrote:
Code: Select all  Expand view

#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: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: C into PRG problem

Postby richard-service » Thu Aug 19, 2021 7: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 (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: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: C into PRG problem

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

Re: C into PRG problem

Postby richard-service » Tue Aug 24, 2021 9: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 (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: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 47 guests