plerup/makeEspArduino

Cannot Use cpp file

animeshdhakal opened this issue · 1 comments

When I rename the file from ino to cpp it gives me this error

Versions: Unknown, 2.7.2-245-g20413f81
/home/animeshdhakal/Desktop/esp/build/esp8266/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/10.2.0/../../../../xtensa-lx106-elf/bin/ld: /tmp/mkESP/main_generic/arduino.ar(core_esp8266_main.cpp.o): in function __loop_end': /home/animeshdhakal/Desktop/esp/build/esp8266/cores/esp8266/core_esp8266_main.cpp:188: undefined reference to setup'
/home/animeshdhakal/Desktop/esp/build/esp8266/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/10.2.0/../../../../xtensa-lx106-elf/bin/ld: /tmp/mkESP/main_generic/arduino.ar(core_esp8266_main.cpp.o):(.text._ZL12loop_wrapperv+0xc): undefined reference to loop' /home/animeshdhakal/Desktop/esp/build/esp8266/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/10.2.0/../../../../xtensa-lx106-elf/bin/ld: /tmp/mkESP/main_generic/arduino.ar(core_esp8266_main.cpp.o): in function _ZL12loop_wrapperv':
/home/animeshdhakal/Desktop/esp/build/esp8266/cores/esp8266/core_esp8266_main.cpp:192: undefined reference to setup' /home/animeshdhakal/Desktop/esp/build/esp8266/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/10.2.0/../../../../xtensa-lx106-elf/bin/ld: /home/animeshdhakal/Desktop/esp/build/esp8266/cores/esp8266/core_esp8266_main.cpp:195: undefined reference to loop'
collect2: error: ld returned 1 exit status
make: *** [build/makeEspArduino/makeEspArduino.mk:321: /tmp/mkESP/main_generic/main.bin] Error 1

Make sure that you have this in your .cpp file

#include "Arduino.h"