Reputation: 113
I am getting some errors when trying to #include iostream. I know the problem is iostream because my project compiled before, but after including iostream I have errors.
I am trying to use iostream because printf does not appear to work and I want to use cout.
I am using keil uvision 5 and yes my file is saved as main.cpp, however there are c files in my project but I would think that doesn´t matter.
Does anyone have any ideas?
oops forgot to include the errors:
STM324x9I-EVAL-MB1063\STM324x9I-EVAL-MB1063.axf: Error: L6218E: Undefined symbol __fread_bytes_avail (referred from ios.o).
STM324x9I-EVAL-MB1063\STM324x9I-EVAL-MB1063.axf: Error: L6218E: Undefined symbol mbsinit (referred from ios.o).
STM324x9I-EVAL-MB1063\STM324x9I-EVAL-MB1063.axf: Error: L6218E: Undefined symbol wmemmove (referred from ios.o).
it is also saying:
error in include chain (__exception.h): non-const lvalue reference to type '__builtin_va_list' cannot bind to a value of unrelated type 'va_list' (aka 'std::__va_list')
error in include chain (ostream): explicit specialization of '_C_is_cout' after instantiation
My main file is extremely long. I understand it is hard to say without seeing it but I am just looking for a general answer. Why would these errors ever occur in a std library file? There should be no errors in a std lib file
Upvotes: 1
Views: 1681
Reputation: 21
Do you try to write
' #include "iostream"'
Maybe you should try to write like this:
'#include "iostream.h"'
Just my guess though
Upvotes: 0