hi,
using this code below i have errors compilation
I read in a forum that it was possible to avoid this by adding a compilation directive but I do not know or put it, maybe in the file platfomr.txt?
the directive is -D_GLIBCXX_USE_CXX11_ABI=0
i need to use std::string because is an old program.
Has someone already had this problem
i use teensy 3.6 last version and arduino last version.
Thanks for your help.
using this code below i have errors compilation
Code:
#include <string>
...
void CHTTP::SetProtocolVersion(CSockProtocol protocol)
{
switch (protocol)
{
case HTTP10:
m_sProtocolVersion.erase();
m_sProtocolVersion.insert(0, "HTTP/1.0");
break;
case HTTP11:
m_sProtocolVersion.erase();
m_sProtocolVersion.insert(0, "HTTP/1.1");
break;
default:
m_sProtocolVersion.erase();
m_sProtocolVersion.insert(0, "HTTP/1.1");
break;
}
}
variables m_sProtocolVersion are declared as std::string m_sProtocolVersion;
Compilation errors:
d:\program files (x86)\arduino\hardware\tools\arm\arm-none-eabi\include\c++\5.4.1\bits/basic_string.h:1659: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned int, unsigned int, char const*, unsigned int)'
d:\program files (x86)\arduino\hardware\tools\arm\arm-none-eabi\include\c++\5.4.1\bits/basic_string.h:1659: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned int, unsigned int, char const*, unsigned int)'
d:\program files (x86)\arduino\hardware\tools\arm\arm-none-eabi\include\c++\5.4.1\bits/basic_string.h:1659: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned int, unsigned int, char const*, unsigned int)'
I read in a forum that it was possible to avoid this by adding a compilation directive but I do not know or put it, maybe in the file platfomr.txt?
the directive is -D_GLIBCXX_USE_CXX11_ABI=0
i need to use std::string because is an old program.
Has someone already had this problem
i use teensy 3.6 last version and arduino last version.
Thanks for your help.