> >*** sc_dll.h >typedef struct SGlobalMemorytag >{ >.... >)SGlobalMemorytag > >SGlobalMemorytag* Init_scom(int); >void Close_scom(); >void Timer_proc(); > > >*** My main program > >#include "sc.dll.h" >#define MAX_CON 20 > >SGlobalMemorytag* sg > > > >void InitCom(ParamBlk *parm) >{ > long i = p0.ev_long-1; > sg = Init_scom(i); > if(sg == NULL) > _RetLogical(false); > else > { > for(int i=0;i<MAX_CON;i++) > sg->installed[i] = 0; > _RetLogical(true); > } >} >>
#include "sc.dll.h" // should this be sc_dll.h ?If it is a typo, try to add extern "C"
#include "sc_dll.h" #define MAX_CON 20 extern "C" // Assume C declarations for C++ { // put all of your prototype/declarations for the external header file here SGlobalMemorytag* sg } // End of extern "C"Try to compile again
#ifdef __cplusplus extern "C" { #endif typedef struct SGlobalMemorytag { .... )SGlobalMemorytag SGlobalMemorytag* Init_scom(int); void Close_scom(); void Timer_proc(); #ifdef __cplusplus } #endif