【问题标题】:library config doesn't support I/O in IAR库配置不支持 IAR 中的 I/O
【发布时间】:2021-04-26 08:00:35
【问题描述】:

我是 IAR 新手,我只是在配置一个 C++ 项目,但我对这个错误感到惊讶: Fatal Error[Pe035]: #error directive: "This library configuration does not support file I/O, either use another existing library configuration or define a new and rebuild the library." 在 fstream 文件中(在我的情况下是只读的)。

以下是导致错误的代码行:

#if !_DLIB_FILE_DESCRIPTOR
  #error "This library configuration does not support file I/O, either use \
          another existing library configuration or define a new and rebuild \
          the library."
#endif

我该如何解决这个问题?

【问题讨论】:

    标签: c++ fstream iar


    【解决方案1】:

    默认情况下不启用文件流。

    转到您的项目选项(Project > Options... 菜单),选择General Options 类别和Library Configuration 选项卡。从Library 下拉列表中选择Full

    请注意,这只是在库中启用文件流。当您使用带有 C-SPY 调试器的文件流(我认为启用了半主机)时,它会在您的计算机上打开文件。为了从您的嵌入式设备内存中读取文件,您还需要实现 DLIB 低级 I/O 接口。阅读 IAR 手册了解如何做到这一点。

    【讨论】:

      猜你喜欢
      • 2021-06-29
      • 2013-02-03
      • 2011-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-19
      • 2016-07-15
      • 1970-01-01
      相关资源
      最近更新 更多