Page 1 of 1

求助!idf从4.4升级到5.1.2后编译出错,不能生成可执行文件

Posted: Tue Jan 09, 2024 6:30 am
by 18437950826
FAILED: espiot.elf
cmd.exe /C "cd . && C:\Users\lufei\.espressif\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32=0 -Wl,--Map=D:/BaiduNetdiskWorkspace/WORK/smart_sell/zhican_lijin/build/espiot.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32.peripherals.ld -T esp32.rom.ld -T esp32.rom.api.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-funcs.ld -T memory.ld -T sections.ld @CMakeFiles\espiot.elf.rsp -o espiot.elf && cd ."
c:/users/lufei/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/user/libuser.a(mass_algorith.c.obj):D:/BaiduNetdiskWorkspace/WORK/smart_sell/zhican_lijin/user/mass_detect/include/mass_calbication.h:35: multiple definition of `calibrate_data'; esp-idf/user/libuser.a(mass_detect.c.obj):D:/BaiduNetdiskWorkspace/WORK/smart_sell/zhican_lijin/user/mass_detect/include/mass_calbication.h:35: first defined here
c:/users/lufei/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/user/libuser.a(mass_calbication.c.obj):D:/BaiduNetdiskWorkspace/WORK/smart_sell/zhican_lijin/user/mass_detect/include/mass_calbication.h:35: multiple definition of `calibrate_data'; esp-idf/user/libuser.a(mass_detect.c.obj):D:/BaiduNetdiskWorkspace/WORK/smart_sell/zhican_lijin/user/mass_detect/include/mass_calbication.h:35: first defined here
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Re: 求助!idf从4.4升级到5.1.2后编译出错,不能生成可执行文件

Posted: Fri Apr 26, 2024 5:44 am
by mahone
我升级也报了这样的错误,请问你后来怎么解决的?