Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

std::string doesn't compile #199

Open
Open
@facchinm

Description

@facchinm

Any sketch usingstd::string will either fail compiling or, if

  void __throw_bad_alloc() {}  void __throw_bad_function_call() {}  void __throw_length_error(const char*) {}};

gets removed fromabi.cpp, fails to run in dynamic mode.

Compiler output:

/ssd/Arduino15/packages/dev/tools/arm-zephyr-eabi/0.16.8/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld: /ssd/Arduino15/packages/dev/tools/arm-zephyr-eabi/0.16.8/bin/../lib/gcc/../../picolibc/arm-zephyr-eabi/lib/thumb/v8-m.main+fp/hard/libstdc++.a(functexcept.o): in function `std::__throw_bad_alloc()':functexcept.cc:(.text.unlikely._ZSt17__throw_bad_allocv+0x0): multiple definition of `std::__throw_bad_alloc()';

Shell output on dynamic mode with overrides commented out

[00:00:00.204,000] <err> elf: sym 'memcpy': relocation out of range (0x2000cc76 -> 0x801b047)

Minimal reproducible example:

void setup() {  std::string c = "notworking";  Serial.println(c.c_str());}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp