gpt4 book ai didi

c++ - 在 OS X 上找不到包含文件

转载 作者:行者123 更新时间:2023-11-30 04:28:31 35 4
gpt4 key购买 nike

我无法在 mac 中使用 mqueue.h。当我尝试在我的 C++ 程序中包含此头文件时,它显示 Cannot find include file 。有没有办法在 mac 中使用它?或者是否有任何通用的替代方案。

我想使用存在于 mqueue.h 中的 O_NOBLOCK 标志?

我发现 IPC 消息队列有以下限制,在决定使用它们之前可能会有用。

Max Number of Msg Queue Identifiers = 16
Max Size of Messages = 8192 (Bytes)
Default Max Size of a Message Queue = 16384

最佳答案

mqueueh.h适用于 POSIX 消息队列,在 OS X 上不可用。 O_NONBLOCK与此无关,并在 fcntl.h 中定义.

#include <sys/fcntl.h>

应该可以解决问题。

关于c++ - 在 OS X 上找不到包含文件 <mqueue.h>?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10079403/

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