问个ACE_Message_Queue奇怪的问题
今天看ACE程序员指南照着第七章的例子输代码
#include "ace/Message_Queue_T.h"
#include "ace/Message_Block.h"
#include "ace/SOCK_Stream.h"
......................................................................
private:
ACE_SOCK_Stream sock_;
ACE_Message_Queue<ACE_NULL_SYNCH> output_queue_;
};
报的一个错是
d:\ace_wrappers\ace\message_queue_t.h(586) : error C2079: “ACE_Message_Queue<_ACE_SYNCH>::lock_”使用未定义的 class“
ACE_Null_Mutex”
with
[
_ACE_SYNCH=ACE_NULL_SYNCH
]
c:\documents and settings\administrator\my documents\visual studio 2005\projects\testserv\testserv\clientservice.h(31): 参见对正在编译的类 模板 实例化“ACE_Message_Queue<_ACE_SYNCH>”的引用
with
[
_ACE_SYNCH=ACE_NULL_SYNCH
]
d:\ace_wrappers\ace\message_queue_t.h(589) : error C2079: “ACE_Message_Queue<_ACE_SYNCH>::not_empty_cond_”使用未定义的 class“ACE_Null_Condition”
with
[
_ACE_SYNCH=ACE_NULL_SYNCH
]
d:\ace_wrappers\ace\message_queue_t.h(592) : error C2079: “ACE_Message_Queue<_ACE_SYNCH>::not_full_cond_”使用未定义的 class“ACE_Null_Condition”
with
[
_ACE_SYNCH=ACE_NULL_SYNCH
]
----------------------------------------------------------------------------------------
编译器指向
ACE_SYNCH_MUTEX_T lock_;
/// Used to make threads sleep until the queue is no longer empty.
ACE_SYNCH_CONDITION_T not_empty_cond_;
/// Used to make threads sleep until the queue is no longer full.
ACE_SYNCH_CONDITION_T not_full_cond_;
麻烦各位高手帮我看看 编译时出现 error C2079,通常未能正常的包含头文件
根据ACE类名和头文件之间的关系,你可以检查一下是否包含
#include "ace/Null_Condition.h" 正解,楼上
应包含:#include "ace/Null_Condition.h"
页:
[1]