maniacbug / StandardCplusplus

Standard C++ for Arduino (port of uClibc++)
594 stars 182 forks source link

Problems when compiling library in Arduino IDE #27

Closed colincina closed 1 year ago

colincina commented 6 years ago

It seems like there are some compilation problems related to the istream and ostream classes. I don't think it is related to my code. I get the following errors just after the compiler says the following:

Compiling library "StandardCplusplus"

In file included from C:\Users\XX\Documents\Arduino\libraries\StandardCplusplus/ostream:28:0,

             from C:\Users\XX\Documents\Arduino\libraries\StandardCplusplus/istream:24,

             from C:\Users\XX\Documents\Arduino\libraries\StandardCplusplus/complex:20,

             from C:\Users\XX\Documents\Arduino\libraries\StandardCplusplus\complex.cpp:19:

C:\Users\XX\Documents\Arduino\libraries\StandardCplusplus/ostream_helpers: In static member function 'static void std::__ostream_printout<traits, char, float>::printout(std::basic_ostream<char, traits>&, float)':

C:\Users\XX\Documents\Arduino\libraries\StandardCplusplus/ostream_helpers:250:109: error: there are no arguments to 'dtostrf' that depend on a template parameter, so a declaration of 'dtostrf' must be available [-fpermissive]

length = strlen(dtostrf(f, static_cast<int>(stream.width()), static_cast<int>(stream.precision()), buffer));
mike-matera commented 6 years ago

This project is dead. You can use my library in its place:

https://github.com/mike-matera/ArduinoSTL

MRES1 commented 5 years ago

Hi Mike thanks for your work, I wanna get to work "Eigen" for Arduino using your library, is this possible?

tonk777 commented 4 years ago

The project may be dead but the fix is easy (its in the pull request #20)

You can fix this doing the following edits to remove the unnecessary duplicated default template argument on the nested templates (removal of = char_traits<charT> )

File: istream Line: 343 Before:template <class charT,class traits = char_traits<charT> > class _UCXXEXPORT basic_istream<charT,traits>::sentry {

After: template <class charT,class traits > class _UCXXEXPORT basic_istream<charT,traits>::sentry {

File: ostream Line: 317 Before: template <class charT,class traits = char_traits<charT> > After: template <class charT,class traits>

Guchshenskaya commented 3 years ago

The project may be dead but the fix is easy (its in the pull request #20)

You can fix this doing the following edits to remove the unnecessary duplicated default template argument on the nested templates (removal of = char_traits<charT> )

File: istream Line: 343 Before:template <class charT,class traits = char_traits<charT> > class _UCXXEXPORT basic_istream<charT,traits>::sentry {

After: template <class charT,class traits > class _UCXXEXPORT basic_istream<charT,traits>::sentry {

File: ostream Line: 317 Before: template <class charT,class traits = char_traits<charT> > After: template <class charT,class traits>

It helps! Thank you!!!

xavier2910 commented 3 years ago

The project may be dead but the fix is easy (its in the pull request #20)

You can fix this doing the following edits to remove the unnecessary duplicated default template argument on the nested templates (removal of = char_traits<charT> )

File: istream Line: 343 Before:template <class charT,class traits = char_traits<charT> > class _UCXXEXPORT basic_istream<charT,traits>::sentry {

After: template <class charT,class traits > class _UCXXEXPORT basic_istream<charT,traits>::sentry {

File: ostream Line: 317 Before: template <class charT,class traits = char_traits<charT> > After: template <class charT,class traits>

I was having the same problem, thanks!

maniacbug commented 1 year ago

Should be fixed now in 9d8277e