Boost C++ Libraries: Ticket #4180: Compile errors in boost/interprocess/managed_mapped_file.hpp and segment_manager.hpp https://svn.boost.org/trac10/ticket/4180 <p> Hi, </p> <p> I am using boost 1.38 package, on Linux. I am trying to use memory mapped file and I referred link, <a href="http://www.boost.org/doc/libs/1_42_0/doc/html/interprocess/managed_memory_segments.html#interprocess.managed_memory_segments.managed_mapped_files">http://www.boost.org/doc/libs/1_42_0/doc/html/interprocess/managed_memory_segments.html#interprocess.managed_memory_segments.managed_mapped_files</a> </p> <p> Can you please let me know the following, </p> <ol class="loweralpha"><li>Any compiler flags I should use. I am just using -I now as below, g++ -w -I..boostpath/ boostManagedMapperFile.cpp and g++ version is 3.2 </li></ol><ol class="loweralpha" start="2"><li>Can you let me know which version of boost would this work fine on Linux platform, </li></ol><p> Following is the program I am trying to compile, #include &lt;boost/interprocess/managed_mapped_file.hpp&gt; </p> <p> int main() { </p> <blockquote> <p> managed_mapped_file mfile(create_only, "<a class="missing wiki">MyMappedFile</a>", <em>Mapped file name 65536); </em></p> </blockquote> <p> } </p> <p> I am facing following compile errors from file segment_manager.hpp, </p> <p> In file included from /x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/detail/managed_memory_impl.hpp:30, </p> <blockquote> <p> from /x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/managed_mapped_file.hpp:21, from boostManagedMapperFile.cpp:1: </p> </blockquote> <p> /x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/segment_manager.hpp: In </p> <blockquote> <p> member function `void* boost::interprocess::segment_manager&lt;<a class="missing wiki">CharType</a>, <a class="missing wiki">MemoryAlgorithm</a>, <a class="missing wiki">IndexType</a>&gt;::priv_generic_named_construct(unsigned int, const CharT*, unsigned int, bool, bool, boost::interprocess::detail::in_place_interface&amp;, <a class="missing wiki">IndexType</a>&lt;boost::interprocess::detail::index_config&lt;CharT, MemoryAlgorithm&gt; </p> <blockquote class="citation"> <p> &amp;, boost::interprocess::detail::bool_&lt;true&gt;)': </p> </blockquote> </blockquote> <p> /x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/segment_manager.hpp:1127: parse </p> <blockquote> <p> error before `;' token </p> </blockquote> <p> /x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/segment_manager.hpp:1131: parse </p> <blockquote> <p> error before `;' token </p> </blockquote> <p> /x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/segment_manager.hpp: In </p> <blockquote> <p> member function `void* boost::interprocess::segment_manager&lt;<a class="missing wiki">CharType</a>, <a class="missing wiki">MemoryAlgorithm</a>, <a class="missing wiki">IndexType</a>&gt;::priv_generic_named_construct(unsigned int, const CharT*, unsigned int, bool, bool, boost::interprocess::detail::in_place_interface&amp;, <a class="missing wiki">IndexType</a>&lt;boost::interprocess::detail::index_config&lt;CharT, MemoryAlgorithm&gt; </p> <blockquote class="citation"> <p> &amp;, boost::interprocess::detail::bool_&lt;false&gt;)': </p> </blockquote> </blockquote> <p> /x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/segment_manager.hpp:1254: parse </p> <blockquote> <p> error before `;' token </p> </blockquote> <p> boostManagedMapperFile.cpp: In function `int main()': boostManagedMapperFile.cpp:5: `managed_mapped_file' undeclared (first use this </p> <blockquote> <p> function) </p> </blockquote> <p> boostManagedMapperFile.cpp:5: (Each undeclared identifier is reported only once </p> <blockquote> <p> for each function it appears in.) </p> </blockquote> <p> boostManagedMapperFile.cpp:5: parse error before `(' token </p> <p> Can you please let me know the following, </p> <ol class="loweralpha"><li>Any compiler flags I should use. I am just using -I now as below, </li></ol><p> g++ -w -I..boostpath/ boostManagedMapperFile.cpp and g++ version is 3.2 </p> <ol class="loweralpha" start="2"><li>Can you let me know which version of boost would this work fine on Linux platform, </li></ol><p> Thanks in advance, Vishwanath!! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4180 Trac 1.4.3 Vishwanath <vishwap37@…> Mon, 03 May 2010 15:03:12 GMT status, severity changed; resolution set https://svn.boost.org/trac10/ticket/4180#comment:1 https://svn.boost.org/trac10/ticket/4180#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Not Applicable</span> </li> </ul> <p> Problem was with wrong version of the compiler!! inconvenience regretted, </p> Ticket