Tool/software: TI C/C++ Compiler
When I include <string> (or any header that uses string, like <iostream>) in my project I get the error message below. I don't have any issue with other STL headers such as <array> or <vector>. I've tried reinstalling the code generation tools, but that didn't fix anything.
>> Compilation failure
source/subdir_rules.mk:163: recipe for target 'source/sys_main.obj' failed
"C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.2.LTS/include/libcxx/__string", line 269: error #121: return value type does not match the function type
"C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.2.LTS/include/libcxx/__string", line 375: error #121: return value type does not match the function type
Here are the referenced lines in the library from the compiler:
inline _LIBCPP_CONSTEXPR_AFTER_CXX14
const char*
char_traits<char>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
{
if (__n == 0)
return NULL; //LINE 269
#if __has_feature(cxx_constexpr_string_builtins)
return __builtin_char_memchr(__s, to_int_type(__a), __n);
#elif _LIBCPP_STD_VER <= 14
return (const char_type*) memchr(__s, to_int_type(__a), __n);
#else
for (; __n; --__n)
{
if (eq(*__s, __a))
return __s;
++__s;
}
return NULL;
#endif
}
...
inline _LIBCPP_CONSTEXPR_AFTER_CXX14
const wchar_t*
char_traits<wchar_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
{
if (__n == 0)
return NULL; //LINE 375
#if __has_feature(cxx_constexpr_string_builtins)
return __builtin_wmemchr(__s, __a, __n);
#elif _LIBCPP_STD_VER <= 14
return wmemchr(__s, __a, __n);
#else
for (; __n; --__n)
{
if (eq(*__s, __a))
return __s;
++__s;
}
return NULL;
#endif
}
Thank you for your help.