Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iostream compilation error on Arduino Mega #39

Closed
Luana-Menezes opened this issue Jun 6, 2020 · 4 comments · Fixed by #48
Closed

iostream compilation error on Arduino Mega #39

Luana-Menezes opened this issue Jun 6, 2020 · 4 comments · Fixed by #48

Comments

@Luana-Menezes
Copy link

Luana-Menezes commented Jun 6, 2020

/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.

@morrocoyo08
Copy link

Idem com Uno IDE 1.8.13

@mccartes
Copy link

mccartes commented Jul 1, 2021

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.

@singhangadin
Copy link

Deleted test.cpp, it fixed the issue. Problem solved.

@GregJohnStewart
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants