简体   繁体   中英

iostream keil c++ problems

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

Do you try to write

' #include "iostream"'

Maybe you should try to write like this:

'#include "iostream.h"'

Just my guess though

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM