我正在尝试构建项目 esp-obd-emulator 我总是收到以下错误,也许有人可以帮助我。
我正在使用 esp-idf 来构建项目。
C:UsersedvarDesktopesp-idf-2examplesemu>idf.py build
Checking Python dependencies...
Python requirements from C:UsersedvarDesktopesp-idf-2requirements.txt are satisfied.
Executing action: all (aliases: build)
Running ninja in directory c:usersedvardesktopesp-idf-2examplesemubuild
Executing "ninja all"...
[1/5] Performing build step for 'bootloader'
ninja: no work to do.
[2/3] Linking CXX executable emu.elf
FAILED: emu.elf
cmd.exe /C "cd . && C:Usersedvar.espressiftoolsxtensa-esp32-elfesp-2019r2-8.2.0xtensa-esp32-elfbinxtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -nostdlib @CMakeFilesemu.elf.rsp -o emu.elf && cd ."
c:/users/edvar/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/esp32/libesp32.a(cpu_start.c.obj):(.literal.main_task+0x18): undefined reference to `app_main'
c:/users/edvar/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/esp32/libesp32.a(cpu_start.c.obj): in function `main_task':
C:/Users/edvar/Desktop/esp-idf-2/components/esp32/cpu_start.c:539: undefined reference to `app_main'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
esp-obd-emulator 似乎没有移植到 ESP-IDF 2.0 中;它似乎仍在使用 Make 而不是 CMake。要么使用旧版本的 ESP-IDF 编译,要么要求将其更新为 CMake。