Skip to content

collect2.exe: error: ld returned 1 exit status #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
funshion2 opened this issue Mar 7, 2025 · 1 comment
Open

collect2.exe: error: ld returned 1 exit status #87

funshion2 opened this issue Mar 7, 2025 · 1 comment

Comments

@funshion2
Copy link

I try to run cmd: pio run --target upload,but some error occures as following:

Linking .pio\build\esp32dev\firmware.elf
c:/users/administrator/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gc
c/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp
32dev\libFrameworkArduino.a(main.cpp.o):(.literal._Z8loopTaskPv+0x8): undefined
reference to setup()' c:/users/administrator/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gc c/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp 32dev\libFrameworkArduino.a(main.cpp.o):(.literal._Z8loopTaskPv+0xc): undefined reference to loop()'
c:/users/administrator/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gc
c/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp
32dev\libFrameworkArduino.a(main.cpp.o): in function loopTask(void*)': C:/Users/Administrator/.platformio/packages/framework-arduinoespressif32/cores/e sp32/main.cpp:42: undefined reference to setup()'
c:/users/administrator/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gc
c/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/Admin
istrator/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:
48: undefined reference to `loop()'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32dev\firmware.elf] Error 1
========================= [FAILED] Took 71.38 seconds =========================

Environment Status Duration


esp32dev FAILED 00:01:11.380
==================== 1 failed, 0 succeeded in 00:01:11.380 ====================

@jnthas
Copy link
Owner

jnthas commented Mar 30, 2025

Hi @funshion2 , did you follow these steps here?
https://github.com/jnthas/clockwise?tab=readme-ov-file#how-to-change-the-clockface-platformio

It seems the project is misconfigured
48: undefined reference to loop()'`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants