Forum Discussion
- BAnde177 years ago
New Contributor
I installed Quartus Prime standard 18.1.0.625. Looking back just now I was confused about the file name I tried to include. In the directory I mentioned there is a "basic_string.h" file which has an inline definition of the to_string () template functions variations I need. The linker complains that to_string is not a member of std:: namespace. If I drop the std:: This led me to believe that the header file is not being included I am off working on something else right now so I don't have the example error handy. but this trivial test show the problem
#include <string>
using namespace std;
int main()
{
string teststring("hey there");
printf("srtring = %s \n", std::to_string(teststring);
return 0;
}
~
$ nios2-elf-g++ -std=c++14 -c fo.cpp
fo.cpp: In function 'int main()':
fo.cpp:8:31: error: 'to_string' is not a member of 'std'
printf("srtring = %s \n", std::to_string(teststring);
^
Thanks for the response. Sorry I wasn't clearer.
Bill
- BAnde177 years ago
New Contributor
Hello I am wondering if received my response to your posting. Do you know if the std::to_string function should be available in Nios2?? Thanks Bill Bill Anderson Contract Senior SW Engineer Waters Corporation (Cell) 508-843-7067 (office) 508-482-3399