【问题标题】:undefined reference to 'lio_listio' [posix asynchronous I/O]未定义对“lio_listio”的引用 [posix 异步 I/O]
【发布时间】:2012-08-25 13:39:47
【问题描述】:

我正在尝试在我的程序中使用 POSIX API 'lio_listio' 来发出多个异步 I/O 系统调用,并产生 1 个内核上下文切换的开销。

我已经包含了库 aio.h 并且还使用 -laio 标志编译了我的代码。 我也安装了 libaio_devel 包。

当我编译我的程序时,它给出了以下编译错误:

/home/me/bon/bon.cpp:2509:未定义对 `lio_listio' 的引用

有人可以建议我缺少什么。

【问题讨论】:

    标签: linux posix aio


    【解决方案1】:

    你很可能错过了-lrt。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-06-19
      • 1970-01-01
      • 1970-01-01
      • 2018-12-31
      • 2011-03-14
      • 1970-01-01
      • 2012-09-14
      • 1970-01-01
      相关资源
      最近更新 更多