Hi. I have a problem that I hoped you could help me with.
I have an older project that I worked on using Arduino IDE 1.5.7 with an added "-std=gnu++11" compile flag and I recently decided to update to a newer IDE version, but I can't get the program to compile. I've tried Arduino IDE 1.8.0 and 1.6.13 but I get the same problem which seems to be related to the usage of std::string.
undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
undefined reference to `std::string::_Rep::_S_empty_rep_storage'
undefined reference to `std::basic_string
So why have this stopped working on the new Arduino version and is there any simple way to fix this? If the answer is to remove all instances of std::string and use Arduinos String instead then I have to stick to the old IDE.
However, after searching the web a bit more, I think that might not be the problem. I did find some issues with people who were having similar issues while programming with C++. And the common solution to those issues seemed to be that they were linked with gcc instead of g++. Since I am not that experienced with Arduino, I do not know if something like that applies to Arduino
Yes since it works fine in the earlier version it probably something with the linker parameters in the newer one, but as far as I can tell it looks like its using g++ in the correct places.