gpt4 book ai didi

c++ - iostream keil c++ 问题

转载 作者:太空宇宙 更新时间:2023-11-04 13:48:18 27 4
gpt4 key购买 nike

我在尝试 #include iostream 时遇到一些错误。我知道问题出在 iostream 上,因为我的项目之前编译过,但是在包含 iostream 之后我有错误。

我正在尝试使用 iostream,因为 printf 似乎不起作用,而我想使用 cout。

我正在使用 keil uvision 5,是的,我的文件保存为 main.cpp,但是我的项目中有 c 文件,但我认为这无关紧要。

有没有人有什么想法?

哎呀忘记包括错误:

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

它还说:

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

我的主文件非常长。我知道不看就很难说,但我只是在寻找一个一般性的答案。为什么这些错误会出现在 std 库文件中? std lib 文件中应该没有错误

最佳答案

你试试写

' #include "iostream"'

也许你应该尝试这样写:

'#include "iostream.h"'

只是我的猜测

关于c++ - iostream keil c++ 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24732030/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com