> For example, if I go into Application Configuration -> Testing -> [*]
> C++ test program,
> when I try to compile I get the following types of errors:
>
> ...
> from /usr/include/newlib/c++/9.2.1/fstream:38,
> from cxxtest_main.cxx:43:
> /usr/include/newlib/c++/9.2.1/bits/basic_string.h: In function 'int
> std::__cxx11::stoi(const wstring&, std::size_t*, int)':
> /usr/include/newlib/c++/9.2.1/bits/basic_string.h:6610:47: error:
> 'wcstol' is not a member of 'std'; did you mean 'wcstol'?
> 6610 | { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi",
> __str.c_str(),
> | ^~~~~~
>
> So my compiler is including header files from the wrong library and I
> don't know how to make it build against a different library.
fstream should be provided uClibc++. It should get installed per the
instructions in the README.txt file of the uClib++ repository.
So there are only two likely possibilities:
1. The fstream file was not properly installed. Try `find include -name
fstream` to see if it was installed and where it was installed.
2. There is a problem with the include patch provided to GCC. Build
again with 'make V=1' The compilation of cxxtest_main.cxx should fail
in the same way but you you can see the GCC command line and the include
path options provided to GCC.
Is the include path where fstream resides properly provided to GCC?