iostream compilation error on Arduino Mega
Luana-Menezes opened this issue ยท 4 comments
/home/luana/Arduino/libraries/LinkedList/tests.cpp:5:10: fatal error: iostream: No such file or directory
#include <iostream>
^~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for Arduino Mega or Mega 2560 board. It just works removing this file.
Idem com Uno IDE 1.8.13
It looks like Iostream is not supported in arduino:
in the linked list library it fails to compile on arduino because the linked list library includes the following in the "tests.cpp" file:
#include
std::cout<< "Tests pass"<< std::endl;
when I comment out these two lines, then the whole thing compiles successfully
However this test.cpp also breaks the serial monitor.
Deleted test.cpp, it fixed the issue. Problem solved.
Deleted test.cpp, it fixed the issue. Problem solved.
Confirmed, worked for me as well. Fairly annoying for someone trying to use the lib with Arduino, but at least it's not a complex fix. Looks to me that the Arduino IDE is being overzealous and just compiling everything in a library's source directory. I wonder if there is a way to get around that?