I am trying to wrap a DLL, using its header file, through SWIG. I got a syntax error while processing my interface .i file using SWIG. After tracking down what was the offending line (line number of the printed by SWIG error message did not match the true offending line), I found that the minimum non-processable SWIG interface file is:
/* example.i */
%module example
%{
extern __declspec(dllimport) INT __cdecl function(int argument);
%}
extern __declspec(dllimport) INT __cdecl function(int argument);
Where the prototype tern extern __declspec(dllimport) INT __cdecl function(int argument);
was obtained from the header file I was trying to wrap.
There are tens of functions declared with this type. As you can see I dont have enough C experience to tell whether this type makes sense. The header file came from the vendor and it compiles OK using Visual C++ 6. Could somebody clarify me?