请教大牛关于Boost.Interprocess managed_shared_memory 问题、多谢

qq_35316130 2016-06-14 11:55:50
本人刚开始用boost 、程序在linux上没问题、在aix上编译就有问题、aix下弄好久编译boost都没有过、最后看到网上说用Boost.Interprocess可以不用编译库、最后放弃编译、直接编译程序,程序如下:

managed_shared_memory segment ( create_only
, "MySharedMemory" //Shared memory object name
, 65536);
经推理好像走到这、就会报错、错误如下:
1540-0216 (S) An expression of type "overloaded function: U::to_node_ptr" cannot be converted to type "boost::interprocess::offset_ptr<boost::intrusive::compact_rbtree_node<boost::interprocess::offset_ptr<void,long,unsigned long,0> >,long,unsigned long,0> (boost::intrusive::detail::base_hook_traits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,boost::interprocess::offset_ptr<void,long,unsigned long,0>,0>::block_ctrl,boost::intrusive::rbtree_node_traits<boost::interprocess...".
"/cbs/cbstest/src/piliang/olbatch/boost/boost/intrusive/detail/utilities.hpp", line 384.20: 1540-0424 (I) "boost::intrusive::detail::base_hook_traits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,boost::interprocess::offset_ptr<void,long,unsigned long,0>,0>::block_ctrl,boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void,long,unsigned long,0>,1>,0,boost::intrusive::default_tag,3>::to_node_ptr(reference)" is declared on line 384 of "/cbs/cbstest/src/piliang/olbatch/boost/boost/intrusive/detail/utilities.hpp".
"/cbs/cbstest/src/piliang/olbatch/boost/boost/intrusive/detail/utilities.hpp", line 387.26: 1540-0424 (I) "boost::intrusive::detail::base_hook_traits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,boost::interprocess::offset_ptr<void,l
...全文
208 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
THE BOOST C++ LIBRARIES是一份自己编译的chm格式文档,描述了如何使用boost类库,目录如下: Front page Chapter 1: Introduction 1.1 C++ and Boost 1.2 Development Process 1.3 Installation 1.4 Overview Chapter 2: Smart Pointers 2.1 General 2.2 RAII 2.3 Scoped Pointer 2.4 Scoped Array 2.5 Shared Pointer 2.6 Shared Array 2.7 Weak Pointer 2.8 Intrusive Pointer 2.9 Pointer Container 2.10 Exercises Chapter 3: Function Objects 3.1 General 3.2 Boost.Bind 3.3 Boost.Ref 3.4 Boost.Function 3.5 Boost.Lambda 3.6 Exercises Chapter 4: Event Handling 4.1 General 4.2 Signals 4.3 Connections 4.4 Exercises Chapter 5: String Handling 5.1 General 5.2 Locales 5.3 Boost.StringAlgorithms 5.4 Boost.Regex 5.5 Boost.Tokenizer 5.6 Boost.Format 5.7 Exercises Chapter 6: Multithreading 6.1 General 6.2 Thread Management 6.3 Synchronization 6.4 Thread Local Storage 6.5 Exercises Chapter 7: Asynchronous Input and Output 7.1 General 7.2 I/O Services and I/O Objects 7.3 Scalability and Multithreading 7.4 Network Programming 7.5 Developing Boost.Asio Extensions 7.6 Exercises Chapter 8: Interprocess Communication 8.1 General 8.2 Shared Memory 8.3 Managed Shared Memory 8.4 Synchronization 8.5 Exercises Chapter 9: Filesystem 9.1 General 9.2 Paths 9.3 Files and Directories 9.4 File Streams 9.5 Exercises Chapter 10: Date and Time 10.1 General 10.2 Calendar Dates 10.3 Location-independent Times 10.4 Location-dependent Times 10.5 Formatted Input and Output 10.6 Exercises Chapter 11: Serialization 11.1 General 11.2 Archive 11.3 Pointers and references 11.4 Serialization of class hierarchy objects 11.5 Wrapper functions for optimization 11.6 Exercises Chapter 12: Parser 12.1 General 12.2 Extended Backus-Naur Form 12.3 Grammar 12.4 Actions 12.5 Exercises Chapter 13: Containers 13.1 General 13.2 Boost.Array 13.3 Boost.Unordered 13.4 Boost.MultiIndex 13.5 Boost.Bimap 13.6 Exercises Chapter 14: Data Structures 14.1 General 14.2 Boost.Tuple 14.3 Boost.Any 14.4 Boost.Variant 14.5 Exercises Chapter 15: Error Handling 15.1 General 15.2 Boost.System 15.3 Boost.Exception Chapter 16: Cast Operators

24,852

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧