title: Arduino - ENC28J60 - EtherCard.h - Compile Error - 'word homePage()' was declared 'extern' and later 'static' [-fpermissive]
body: <ul>
  <li>Arduino Uno 
  
  <ul>
  <li>ENC28J60</li>
  <li>EtherCard.h</li>
  </ul></li>
  </ul>
  
  <p>i am trying to compile and run this example. But i am getting this error.</p>
  
  <blockquote>
    <p>"exit status 1 'word homePage()' was declared 'extern' and later
    'static' [-fpermissive]"</p>
  </blockquote>
  
  <pre><code>#include &lt;EtherCard.h&gt;
  
  static byte mymac[] = {0x65,0x77,0x33,0x2D,0x30,0x66};
  static byte myip[] = {192,168,0,99};
  
  byte Ethernet::buffer[500];
  BufferFiller bfill;
  
  static word homePage() { 
    bfill = ether.tcpOffset();
    bfill.emit_p( PSTR ( 
      "HTTP/1.0 503 test page\r\n"
      "Content-Type: text/html\r\n"
      "Retry-After: 600\r\n"
      "\r\n"
      "&lt;html&gt;"
      "&lt;head&gt;&lt;title&gt;"
      "Arduino test page"
      "&lt;/title&gt;&lt;/head&gt;"
      "&lt;body&gt;"
      "&lt;h3&gt;Test&lt;/h3&gt;" 
      "&lt;p&gt;Test&lt;/p&gt;"
      "&lt;/body&gt;"
      "&lt;/html&gt;" 
    )) ;
    return bfill.position();
    }
  
  void setup() {
    // put your setup code here, to run once:
  
    Serial.begin(57600);
    Serial.println("TEST");
    Serial.println();
  
    Serial.print("Status: ");
    if (ether.begin(sizeof Ethernet::buffer, mymac) == 0) {
      Serial.println( "Failed to access Ethernet controller");
    }
    else {
      Serial.println( "Ethernet controller OK!"); 
      ether.staticSetup(myip); 
      ether.dhcpSetup();
    }
    Serial.println();
  
    ether.printIp("My IP: ", ether.myip);
    ether.printIp("GW IP: ", ether.gwip);
    ether.printIp("DNS IP: ", ether.dnsip);
  
  }
  
  void loop() {
    // put your main code here, to run repeatedly:
    word pos = ether.packetLoop(ether.packetReceive());
    if (pos){
      for (int i=pos;Ethernet::buffer[i]; i++) {
        Serial.print((char)Ethernet::buffer[i]);
        Serial.println();
        ether.httpServerReply(homePage());
      }
    }
  }
  </code></pre>
  
  <p>Is something wrong with the code or library?
  The example was copied from the net. 
  Library was updated.</p>
  
  <p>Could u help me with this problem. How to fix it?</p>