While compiling a C code, I'm getting the following error:
c:\users\kbarman\documents\mser\vlfeat-0.9.13-try\mser\stringop.c(71): error C2491: 'vl_string_parse_protocol' : definition of dllimport function not allowed
In the file stringop.c, I have the following function:
VL_EXPORT char *
vl_string_parse_protocol (char const *string, int *protocol)
{
char const * cpt ;
int dummy ;
/* handle the case prot = 0 */
if (protocol == 0)
protocol = &dummy ;
/* look for :// */
cpt = strstr(string, "://") ;
if (cpt == 0) {
*protocol = VL_PROT_NONE ;
cpt = string ;
}
else {
if (strncmp(string, "ascii", cpt - string) == 0) {
*protocol = VL_PROT_ASCII ;
}
else if (strncmp(string, "bin", cpt - string) == 0) {
*protocol = VL_PROT_BINARY ;
}
else {
*protocol = VL_PROT_UNKNOWN ;
}
cpt += 3 ;
}
return (char*) cpt ;
}
And VL_EXPORT is defined as follows:
# define VL_EXPORT extern "C" __declspec(dllimport)
Can somebody please tell me what is causing this error and how I can get rid of it?