Skip to content
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

[Bug] Failing to link when using esp32-s2 #661

Closed
patrickelectric opened this issue Sep 13, 2024 · 0 comments · Fixed by #667
Closed

[Bug] Failing to link when using esp32-s2 #661

patrickelectric opened this issue Sep 13, 2024 · 0 comments · Fixed by #667
Labels
bug Something isn't working

Comments

@patrickelectric
Copy link
Contributor

Describe the bug

It appears that the Extern C includes are using C++ based files.

.pio/libdeps/lolin_s2_mini/zenoh-pico/src/system/arduino/esp32/network.cpp:18:1: note: 'extern "C"' linkage started here
 extern "C" {
 ^~~~~~~~~~
In file included from /Users/patrick/.platformio/packages/toolchain-xtensa-esp32s2/xtensa-esp32s2-elf/include/c++/8.4.0/algorithm:62,
                 from /Users/patrick/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:184,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/include/zenoh-pico/system/platform/arduino/esp32.h:18,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/include/zenoh-pico/system/platform-common.h:36,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/include/zenoh-pico/system/platform.h:21,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/include/zenoh-pico/collections/element.h:21,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/include/zenoh-pico/collections/string.h:18,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/src/system/arduino/esp32/network.cpp:25:
/Users/patrick/.platformio/packages/toolchain-xtensa-esp32s2/xtensa-esp32s2-elf/include/c++/8.4.0/bits/stl_algo.h:5696:3: error: template with C linkage
   template<typename _ForwardIterator, typename _Compare>
   ^~~~~~~~
.pio/libdeps/lolin_s2_mini/zenoh-pico/src/system/arduino/esp32/network.cpp:18:1: note: 'extern "C"' linkage started here
 extern "C" {
 ^~~~~~~~~~
In file included from .pio/libdeps/lolin_s2_mini/zenoh-pico/include/zenoh-pico/system/platform/arduino/esp32.h:18,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/include/zenoh-pico/system/platform-common.h:36,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/include/zenoh-pico/system/platform.h:21,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/include/zenoh-pico/collections/element.h:21,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/include/zenoh-pico/collections/string.h:18,
                 from .pio/libdeps/lolin_s2_mini/zenoh-pico/src/system/arduino/esp32/network.cpp:25:
/Users/patrick/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:209:10: error: conflicting declaration of C function 'uint16_t makeWord(uint8_t, uint8_t)'
 uint16_t makeWord(uint8_t h, uint8_t l);
          ^~~~~~~~
/Users/patrick/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:208:10: note: previous declaration 'uint16_t makeWord(uint16_t)'
 uint16_t makeWord(uint16_t w);
          ^~~~~~~~
In file included from .pio/libdeps/lolin_s2_mini/zenoh-pico/src/system/arduino/esp32/network.cpp:29:

To reproduce

platformio.ini

[env:lolin_s2_mini]
platform = espressif32
board = lolin_s2_mini
board_build.mcu = esp32s2
framework = arduino

build_flags = -std=c++17 -DZENOH_COMPILER_GCC

lib_deps = 
	https://github.com/eclipse-zenoh/zenoh-pico

System info

  • Esp32-s2 mini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant