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

Problem when compile about std::string by ESP8266-DEVKIT's GCC-xtensa version 5.2.0. #50

Open
TridentTD opened this issue May 23, 2018 · 0 comments

Comments

@TridentTD
Copy link

TridentTD commented May 23, 2018

When I build code like as the following by ESP8266-DEVKIT's GCC-xtensa version 5.2.0.

#include <string>

....

  const char *arr  = "HelloArray";
  std::string str = arr;
...

I found some error

(.text.setup+0x14): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy_chars(char*, char const*, char const*)'
(.text.setup+0x18): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose()'
undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy_chars(char*, char const*, char const*)'
In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)':
xtensa-lx106-elf\include\c++\5.2.0\bits/basic_string.tcc:229: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose()'

collect2.exe: error: ld returned 1 exit status

And this version gcc-xtensa 5.2.0 std::to_string missing ?
Do you mind to upgrade to other version of gcc-xtensa for esp-devkit.

Thank you.

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

1 participant