Hello Experts,
I have this library file .lib from a vendor and have functions that I can call to cvi with the following format
extern "C" __declspec(dllimport) BOOL __stdcall SetTargetHalt();
extern "C" __declspec(dllimport) int __stdcall FLASHErase(int ComPort=1, int nDialogBox=0, int nProtocol=0);
So I have put that code on .h file with
#ifdef __cplusplus
extern "C" {
#endif
__declspec(dllimport) BOOL __stdcall SetTargetHalt();
__declspec(dllimport) int __stdcall FLASHErase(int ComPort=1, int nDialogBox=0, int nProtocol=0);
#ifdef
__cplusplus
}
#endif
I have placed the .lib and .h file to the project and put the implementation on the source .c file
I have called FLASHErase(arg1,arg2,arg3) with all the arguments supplied and it is working.
The problem is when I call the function SetTargetHalt(); the project doesn't compile and the error shows that SetTargetHalt(); doesn't have a prototype, I have tried other functions that don't need an argument but the result is the same asking for prototype.
Sorry for a newbie question. Answers appreciated
Message Edited by smoken on 10-09-2007 05:48 AM