1

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

user3729617
  • 113
  • 1
  • 14
  • 5
    One idea is that you could show us your source code instead of forcing us to use our less-than-perfectly-developed psychic debugging skills :-) – paxdiablo Jul 14 '14 at 08:04
  • 1
    You might also list your compilation line. – Tony Delroy Jul 14 '14 at 08:20
  • 1
    If `printf` "does not appear to work" it seems unlikely that iostream will do any better; it probably uses `printf` under the hood – M.M Jul 14 '14 at 09:06
  • http://www.sscce.org/ – Werner Henze Jul 14 '14 at 09:39
  • 1
    If I do understand your problem, correct me please, you are trying to use standard libraries against a specific microcontroller, presumably one from the STM32 family. Do this device embed a standard output or a console? – Pablo Stark Jul 14 '14 at 11:59

1 Answers1

0

Do you try to write

' #include "iostream"'

Maybe you should try to write like this:

'#include "iostream.h"'

Just my guess though

Shadow
  • 33,525
  • 10
  • 51
  • 64
Kyo
  • 21
  • 2