An00bIS47 / Homekit

Homekit for ESP32 with Arduino framework
Apache License 2.0
83 stars 7 forks source link

undefined reference to `app_main' #5

Closed lehungmt94 closed 4 years ago

lehungmt94 commented 4 years ago

try complie code in windows and got some error

C:\Users\admip\Desktop\esp-idf\Homekit>idf.py build Note: You are using Python 3.7.4. Python 3 support is new, please report any problems you encounter. Search for 'Setting the Python Interpreter' in the ESP-IDF docs if you want to use Python 2.7. Checking Python dependencies... Python requirements from C:\Users\admip\Desktop\esp-idf\requirements.txt are satisfied. Running ninja in directory C:\Users\admip\Desktop\esp-idf\Homekit\build Executing "ninja all"... [1/128] Performing build step for 'bootloader' ninja: no work to do. [125/126] Linking CXX executable Homekit.elf FAILED: Homekit.elf cmd.exe /C "cd . && C:\Users\admip.espressif\tools\xtensa-esp32-elf\1.22.0-80-g6c4433a5-5.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -nostdlib @CMakeFiles\Homekit.elf.rsp -o Homekit.elf && cd ." esp-idf/esp32/libesp32.a(cpu_start.c.obj):(.literal.main_task+0x4): undefined reference to app_main' esp-idf/esp32/libesp32.a(cpu_start.c.obj): In functionmain_task': C:/Users/admip/Desktop/esp-idf/components/esp32/cpu_start.c:534: undefined reference to `app_main' collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed. ninja failed with exit code 1

An00bIS47 commented 4 years ago

Try using make for compilation. You can find additional information here

CMake is the default build system for esp-idf v4.0 and later but this project is using esp-idf v3.3

lehungmt94 commented 4 years ago

Problem is arduino-esp32 v1.0.2. I installed it, but I can't complie project Homekit with esp32 arduino core. I don't know how to do that

An00bIS47 commented 4 years ago

Please have a look at the documentation of the arduino-esp32 project. The details how to compile arduino-esp32 as esp-idf component is described here