- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any way of enabling this portion of libstdc++ in nios2 toolchain.
I find a declaration of to_string() in /cygdrive/c/intelFPGA/18.1/nios2eds/bin/gnu/nios2-elf/include/c++/5.3.0/bits/to_string.h but I can't seem to get the compiler to find this file if I explicitly add it to a small test case.
I have tried setting -I<DirPAth> on the compile line as well without success.
I am new to the nios2-eds tool chain. Any pointers appreciated
Thanks
Bill
- Tags:
- Include
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page