找不到包含文件 <mqueue.h>在 OS X 上? [英] Cannot find include file <mqueue.h> on OS X?

查看:96
本文介绍了找不到包含文件 <mqueue.h>在 OS X 上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在 mac 中使用 mqueue.h.当我尝试将这个头文件包含在我的 C++ 程序中时,它说找不到包含文件.有没有办法在 mac 中使用它?或者是否有任何通用的替代方案.

I am unable to use mqueue.h in mac. When I try to include this header file in my C++ program it says Cannot find include file . Is there a way to use this in mac ? Or are there any universal alternatives to this.

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

I want to use the O_NOBLOCK flag which is present in mqueue.h ?

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

I found out that the IPC message queues have the following restrictions which may be useful before making a decision to use them.

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 中定义.

mqueueh.h is for POSIX messaging queues, and is not available on OS X. O_NONBLOCK has nothing to do with that, and is defined in fcntl.h.

#include

应该可以解决问题.

这篇关于找不到包含文件 <mqueue.h>在 OS X 上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆