Go Down

Topic: IDE can't find lilbarry from github? (Read 226 times) previous topic - next topic

david1234

Sep 22, 2018, 06:36 pm Last Edit: Sep 22, 2018, 07:10 pm by david1234
Hello ,
I bought

NodeMCU ESP8266 E12
and I want to check this code I have found :

Code: [Select]
https://www.hackster.io/rayburne/esp8266-mini-sniff-f6b93a

now I have downlaod the lhe zip file
then I choose in the IDE:
Tools-Board-NodeMCU1.0(ESP 12E Module)
also added the library:
sketch-Include library-Add Zip library - selected the ip file I ahve downlaod

but when I try to upluad the code , I get this error:



Code: [Select]
Arduino: 1.8.2 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\David\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\David\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\David\Documents\Arduino\libraries -fqbn=esp8266:esp8266:nodemcuv2:CpuFrequency=80,FlashSize=4M1M,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,FlashErase=none,UploadSpeed=115200 -ide-version=10802 -build-path C:\Users\David\AppData\Local\Temp\arduino_build_876389 -warnings=none -build-cache C:\Users\David\AppData\Local\Temp\arduino_cache_871430 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2 -prefs=runtime.tools.esptool.path=C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.13 -prefs=runtime.tools.mkspiffs.path=C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\0.2.0 -verbose C:\Users\David\Documents\Arduino\ESP8266_Mini_Sniff\ESP8266_Mini_Sniff.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\David\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\David\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\David\Documents\Arduino\libraries -fqbn=esp8266:esp8266:nodemcuv2:CpuFrequency=80,FlashSize=4M1M,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,FlashErase=none,UploadSpeed=115200 -ide-version=10802 -build-path C:\Users\David\AppData\Local\Temp\arduino_build_876389 -warnings=none -build-cache C:\Users\David\AppData\Local\Temp\arduino_cache_871430 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2 -prefs=runtime.tools.esptool.path=C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.13 -prefs=runtime.tools.mkspiffs.path=C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\0.2.0 -verbose C:\Users\David\Documents\Arduino\ESP8266_Mini_Sniff\ESP8266_Mini_Sniff.ino
Using board 'nodemcuv2' from platform in folder: C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1
Using core 'esp8266' from platform in folder: C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1
Build options changed, rebuilding all
Detecting libraries used...
"C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1/tools/sdk/include" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1/tools/sdk/lwip2/include" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\David\AppData\Local\Temp\arduino_build_876389/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10802 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"   -DESP8266 "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\variants\nodemcu" "C:\Users\David\AppData\Local\Temp\arduino_build_876389\sketch\ESP8266_Mini_Sniff.ino.cpp" -o "nul"
"C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1/tools/sdk/include" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1/tools/sdk/lwip2/include" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\David\AppData\Local\Temp\arduino_build_876389/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10802 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"   -DESP8266 "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\variants\nodemcu" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src" "C:\Users\David\AppData\Local\Temp\arduino_build_876389\sketch\ESP8266_Mini_Sniff.ino.cpp" -o "nul"
"C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1/tools/sdk/include" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1/tools/sdk/lwip2/include" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\David\AppData\Local\Temp\arduino_build_876389/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10802 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"   -DESP8266 "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\variants\nodemcu" "-IC:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src" "C:\Users\David\AppData\Local\Temp\arduino_build_876389\sketch\ESP8266_Mini_Sniff.ino.cpp" -o "C:\Users\David\AppData\Local\Temp\arduino_build_876389\preproc\ctags_target_for_gcc_minus_e.cpp"
C:\Users\David\Documents\Arduino\ESP8266_Mini_Sniff\ESP8266_Mini_Sniff.ino:3:26: fatal error: ./functions.h: No such file or directory

#include "./functions.h"

                         ^

compilation terminated.

C:\Users\David\Documents\Arduino\ESP8266_Mini_Sniff\ESP8266_Mini_Sniff.ino:3:26: fatal error: ./functions.h: No such file or directory

 #include "./functions.h"

                          ^

compilation terminated.

Using library ESP8266WiFi at version 1.0 in folder: C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).




it seem that it doesn't found "function.h" - and I looked at the zip I have download , I don't see him there also....

what an I doing wrong ?

pert

#1
Sep 22, 2018, 07:11 pm Last Edit: Sep 22, 2018, 07:12 pm by pert Reason: Listify instructions
also added the library:
sketch-Include library-Add Zip library - selected the ip file I ahve downlaod
There is no library. This is a multi-file sketch. functions.h is one of the sketch files. It looks like you just copy-pasted the main sketch code from the hackster.io page but you didn't read it carefully enough. You needed to download the .zip file of all the sketch files.

Do this:


Now you will notice that the Sniffing6 sketch has multiple tabs: Sniffing6 (which is the file Sniffing6.ino), Notes.h, functions.h, structures.h. You can click on any of those tabs to see the code.

The #include directive:
Code: [Select]
#include "./functions.h"
is a little different than you'll usually see in Arduino sketches. The use of double quotes rather than angle brackets causes the sketch folder to be searched for the files before looking for them in the libraries folders. The ./ part is completely unnecessary, that just points to the current folder. You could just as well use this #include directive:
Code: [Select]
#include "functions.h"

david1234

great ,
strange I didn't see it -
Thanks - now it's working !


pert

I'm glad to hear it's working now. Enjoy!
Per

Go Up