2 Replies Latest reply on Mar 2, 2014 10:11 AM by Clayton Hofrock

    When i compile <Wire.h> error is appeard ?!

    sherif-ezallo

      When I include most any library in any sketch ,An error in appeared ,Even "Wire.h" library make error !
      For example when i compile this code :

       

      include"wire.h"

      void setup() {}

      void loop() {}

       

      I get this error :

       

      Arduino: 1.5.3 (Windows 7), Board: "Intel® Galileo"

       

      C:\Users\Sherif Gamal\Documents\Arduino\libraries\Wire\utility\twi.c:25:20: fatal error: avr/io.h: No such file or directory

      compilation terminated.

      C:\Users\Sherif Gamal\Documents\Arduino\libraries\Wire\utility\twi.c:25:20: fatal error: avr/io.h: No such file or directory

      compilation terminated.

       

        This report would have more information with

        "Show verbose output during compilation"

        enabled in File > Preferences.

       

      another example :when i compile this

       

      #include<Servo.h>

      void setup() {}

      void loop() {}

       

      I get this error :

      Arduino: 1.5.3 (Windows 7), Board: "Intel® Galileo"

       

      C:\Users\Sherif Gamal\Documents\Arduino\libraries\Servo\Servo.cpp:45:27: fatal error: avr/interrupt.h: No such file or directory

      compilation terminated.

       

        This report would have more information with

        "Show verbose output during compilation"

        enabled in File > Preferences.

       

      I can't imagine How "Wire.h" make error ?! it's supported I think .

      Any any one can help my, If i didn't fix it Galileo board would be a normal processor with input output pins for me !

        • 1. Re: When i compile <Wire.h> error is appeard ?!
          sherif-ezallo

          Fortunately,
          I solved this problem .
          For Wire.h i copied it from core library of Galileo to document
          For Servo.h i copied it from core library of Galileo to document and but Wire.h with it to work.
          But i still asking :
          I don't have aservo motor to check if it works but how can it work and it isn't supported in the same time ?!

          • 2. Re: When i compile <Wire.h> error is appeard ?!
            Clayton Hofrock

            wire.h is a library that is specific to each implementation of the hardware. This library has not been converted for the Galileo in the official release of the IDE. The servo.h file, also has not been converted for Galileo in the official release (though there are official work arounds documented in the release notes and Mikal.Hart has created a version that can be downloaded https://communities.intel.com/message/221795#221795)

             

            I am not sure where you copied the libraries from, but most likely it will not work correctly. It think most versions of the wire.h library are still Arduino specific versions, which are not compatible with the implementation on Galileo.