title: definition of dllimport function not allowed
body: <p>While compiling a C code, I'm getting the following error:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>In the file stringop.c, I have the following function:</p>
  
  <pre><code>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 = &amp;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 ;
  }
  </code></pre>
  
  <p>And VL_EXPORT is defined as follows:</p>
  
  <pre><code>#      define VL_EXPORT extern "C" __declspec(dllimport)
  </code></pre>
  
  <p>Can somebody please tell me what is causing this error and how I can get rid of it?</p>