maniacbug / StandardCplusplus

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

Compile Issue on mac with Arduino 1.5.6-r2 software #9

Closed icodeecono closed 1 year ago

icodeecono commented 10 years ago

Hello,

I get the following error when I try to compile your example string_vector on a mac with Arduino 1.5.6-r2 software. My hardware platform is a Digistump DigiX board. Any ideas?:

Arduino: 1.5.6-r2 (Mac OS X), Board: "Digistump DigiX (standard)"

In file included from /Applications/Arduino_1.5.6.app/Contents/Resources/Java/hardware/digistump/sam/libraries/StandardCplusplus/ostream:28, from /Applications/Arduino_1.5.6.app/Contents/Resources/Java/hardware/digistump/sam/libraries/StandardCplusplus/istream:24, from /Applications/Arduino_1.5.6.app/Contents/Resources/Java/hardware/digistump/sam/libraries/StandardCplusplus/serstream:19, from string_vector.ino:2: /Applications/Arduino_1.5.6.app/Contents/Resources/Java/hardware/digistump/sam/libraries/StandardCplusplus/ostream_helpers: In static member function 'static void std::__ostream_printout<traits, char, float>::printout(std::basic_ostream<char, traits>&, float)': /Applications/Arduino_1.5.6.app/Contents/Resources/Java/hardware/digistump/sam/libraries/StandardCplusplus/ostream_helpers:250: error: there are no arguments to 'dtostrf' that depend on a template parameter, so a declaration of 'dtostrf' must be available /Applications/Arduino_1.5.6.app/Contents/Resources/Java/hardware/digistump/sam/libraries/StandardCplusplus/ostream_helpers:250: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) string_vector.ino: At global scope: string_vector:13: error: no matching function for call to 'std::basic_oserialstream<char, std::char_traits, HardwareSerial>::basicoserialstream(Serial&)' /Applications/Arduino_1.5.6.app/Contents/Resources/Java/hardware/digistump/sam/libraries/StandardCplusplus/serstream:230: note: candidates are: std::basic_oserialstream<charT, traits, Tserial>::basic_oserialstream(Tserial&) [with charT = char, traits = std::char_traits, Tserial = HardwareSerial] /Applications/Arduino_1.5.6.app/Contents/Resources/Java/hardware/digistump/sam/libraries/StandardCplusplus/iosfwd:113: note: std::basic_oserialstream<char, std::char_traits, HardwareSerial>::basic_oserialstream(const std::basic_oserialstream<char, std::char_traits, HardwareSerial>&)

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.

ghost commented 9 years ago

I'm having the same issue, did anyone ever figure this out?

nickgammon commented 9 years ago

I found the same thing when compiling under 1.6.4 for the Due, but it compiled OK for a Uno. It looks like dtostrf is not in the Due library. Perhaps compensate by having an #ifdef for that board?

maniacbug commented 1 year ago

Fixed now in 275638685ac333cd4b59caff7d4e6f46e849c22a