Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12603 Discussions

priority queue on nios II using Standard Template Library or libstdc++

Altera_Forum
Honored Contributor II
1,000 Views

Hi, 

 

would like to implement a simple priority queue on the nios II procesor using Nios II SBT. First hits on google suggest the use of Standard Template Library STL. So this would be my first choice. But embedded design is not that easy and I figured out that using libstdc++ is the better choice, as Altera provides a Nios version (please correct me). 

 

Now my question is, how I can use this lib?  

# include <libstdc++> or# include <libstdc++.a> gives me warning that file is not found.  

 

A search on my Quartus installation folder says there are plenty of libstdc++.a. So, I tried to include the path of one of those by editing the makefile: 

# List of include directories for -I compiler option (-I added when used).# Includes the BSP. ALT_INCLUDE_DIRS := C:\alteranew\11.1\nios2eds\bin\gnu\H-i686-mingw32\nios2-elf\lib Still doesn't find it. Any suggestions?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
314 Views

If you want a simple priority queue - write one!

0 Kudos
Altera_Forum
Honored Contributor II
314 Views

Hi dsl, 

 

of course I could do that and you probably express the opinion of many here. 

But I personally think it doesn't make sense to reinvent the wheel every time and I'm very sure that mine won't be the best one.  

Besides that, my question is more general about the use of c++ libraries with nios II. 

 

Regards, Tobi
0 Kudos
Reply