You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello all,
I recently stumbled upon this project when looking for ways to use cmake with Arduino. I am reusing the examples within the project, and wanted to expand blink.cpp by using . Only adding the include into blink.cpp makes the compilation fail. cmake is unable to find the library and terminates compilation. I fail to understand why. Could anyone enlighten me?
The text was updated successfully, but these errors were encountered:
Hello Anna,
you seem to misunderstand what Arduino CMake actually is and what it isn't. Let me explain: Arduino CMake is just a build system to give you more freedom in structure and options especially for bigger projects. But it still uses the very same compiler and libraries Arduino itself provides (avr-gcc and the default Arduino libraries).
So while you can compile and link additional libraries with CMake, it still does not provide fully-fledged C++ standard library (which iostream belongs to*).
To answer your question, if you want to interact with a user, you could just use the Serial library and connect to the virtual serial terminal on PC. Please do note however, that this is by far simpler than the C++ stream libraries.
Although it's been 2 months, I hope I still could help a little.
This is oversimplified. The C++ standard defines freestanding and hosted environments (neither of which Arduino fully provides) and the stream libraries belong to the latter, thus you shouldn't expect them to be available in most lowlevel compiler toolchains.
Hello all,
I recently stumbled upon this project when looking for ways to use cmake with Arduino. I am reusing the examples within the project, and wanted to expand blink.cpp by using . Only adding the include into blink.cpp makes the compilation fail. cmake is unable to find the library and terminates compilation. I fail to understand why. Could anyone enlighten me?
The text was updated successfully, but these errors were encountered: