# Error compiling nodemcu example

**URL:** <https://forum.xod.io/t/error-compiling-nodemcu-example/3154>\
**Category:** Uncategorized\
**Created:** [December 28, 2019, 2:58am UTC](https://forum.xod.io/t/error-compiling-nodemcu-example/3154 "2019-12-28T02:58:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![omran](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/omran/32/1112_2.png) [@omran](https://forum.xod.io/u/omran)\
**Post date:** [December 28, 2019, 2:58am UTC](https://forum.xod.io/t/error-compiling-nodemcu-example/3154/1 "2019-12-28T02:58:40Z")

</div>

Tried to compile the example given in xod-dev/esp8266-mcu but got error. I’m using xod version 0.32.1 on linux (Ubuntu 18.4) and my board is NodeMCU-Esp-12.

Can anyone give a hand resolving this issue?

"/ws/sketchbook/cf8afc553d3085e090cd8c6a16faa4cfb620248454433e492f084490b9796948/sketch/sketch.ino:966:10: fatal error: ‘ESP8266WiFi.h’ file not found  
#include \<ESP8266WiFi.h\>  
^ ~~~~~~~~~~~~~~  
1 error generated.  
shared:ERROR: ‘/ws/arduino\_data/packages/xod/tools/emscripten/1.39.2/bin/clang++ -target wasm32-unknown-emscripten -D\_\_EMSCRIPTEN\_major\_\_=1 -D\_\_EMSCRIPTEN\_minor\_\_=39 -D\_\_EMSCRIPTEN\_tiny\_\_=1 -D\_LIBCPP\_ABI\_VERSION=2 -Dunix -D\_\_unix -D\_\_unix\_\_ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/ws/arduino\_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/include/libcxx -Xclang -isystem/ws/arduino\_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/lib/libcxxabi/include -Xclang -isystem/ws/arduino\_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/include/compat -Xclang -isystem/ws/arduino\_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/include -Xclang -isystem/ws/arduino\_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/include/libc -Xclang -isystem/ws/arduino\_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/ws/arduino\_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/local/include -DLLVM\_ROOT=/ws/arduino\_data/packages/xod/tools/emscripten/1.39.2/bin -DARDUINO\_WASM\_SIMULATION -DARDUINO\_ARCH\_WASM -O2 -std=c++11 -nostdlib -fno-exceptions -fno-rtti -c -I/tmp/arduino-sketch-BA8DB8B7B8947F2C662AE4E85F5D8C72/sketch -I/ws/arduino\_data/packages/xod/hardware/wasm/0.2.0/cores/simulation -I/ws/arduino\_data/packages/xod/hardware/wasm/0.2.0/variants/simulation -DEMSCRIPTEN /tmp/arduino-sketch-BA8DB8B7B8947F2C662AE4E85F5D8C72/sketch/sketch.ino.cpp -Xclang -isystem/ws/arduino\_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/include/SDL -c -o /dev/null -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr’ failed (1)

The generated C++ code contains errors. It can be due to a bad node implementation  
or if your board is not compatible with XOD runtime code. The original compiler error  
message is above. Fix C++ errors to continue. If you believe it is a bug, report the  
problem to XOD developers.  
"

---

<div class="post-metadata">

**Author:** ![robertspark](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@robertspark](https://forum.xod.io/u/robertspark)\
**Post date:** [December 28, 2019, 7:19am UTC](https://forum.xod.io/t/error-compiling-nodemcu-example/3154/2 "2019-12-28T07:19:33Z")

</div>

Have you installed the latest Arduino IDE ?

It cannot find a header file … This can sometimes be solved by installing the latest Arduino IDE

And or by adding " boards " to the Arduino IDE and or by installing " libraries " to the Arduino IDE

[https://www.arduino.cc/en/guide/libraries](https://www.arduino.cc/en/guide/libraries)

---

<div class="post-metadata">

**Author:** ![omran](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/omran/32/1112_2.png) [@omran](https://forum.xod.io/u/omran)\
**Post date:** [December 29, 2019, 11:17am UTC](https://forum.xod.io/t/error-compiling-nodemcu-example/3154/3 "2019-12-29T11:17:54Z")

</div>

Thank you for your contribution.  
The issue is not related to Arduino IDE it is related to XOD library “esp8266-mcu-device”.  
When I include the node “connect” from the mentioned library I receive the error.  
I tried to add the line (#pragma XOD require “[http://arduino.esp8266.com/stable/package\_esp8266com\_index.json](http://arduino.esp8266.com/stable/package_esp8266com_index.json)”) to the “not-implemented-in-xod” and recompiled once again but unfortunately received the same error.

Note the I can load programs to the board through Arduino IDE with no errors.
