Can't use uint16_t in library
Using #include &lt;Arduino.h&gt; in your myheader.h will also include &lt;stdint.h&gt; and probably solve this.

The Arduino IDE automatically includes Arduino.h in the sketch itself, but apparently not for external stuff.