Opened 12 years ago

Closed 12 years ago

#4180 closed Bugs (invalid)

Compile errors in boost/interprocess/managed_mapped_file.hpp and segment_manager.hpp

Reported by: vishwap37@… Owned by: Nikolay Mladenov
Milestone: Boost 1.43.0 Component: interprocess
Version: Boost 1.38.0 Severity: Not Applicable
Keywords: managed_mapped_file.hpp segment_manager.hpp Cc: vishwap37@…

Description

Hi,

I am using boost 1.38 package, on Linux. I am trying to use memory mapped file and I referred link, http://www.boost.org/doc/libs/1_42_0/doc/html/interprocess/managed_memory_segments.html#interprocess.managed_memory_segments.managed_mapped_files

Can you please let me know the following,

  1. 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
  1. Can you let me know which version of boost would this work fine on Linux platform,

Following is the program I am trying to compile, #include <boost/interprocess/managed_mapped_file.hpp>

int main() {

managed_mapped_file mfile(create_only, "MyMappedFile", Mapped file name 65536);

}

I am facing following compile errors from file segment_manager.hpp,

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,

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:

/x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/segment_manager.hpp: In

member function `void* boost::interprocess::segment_manager<CharType, MemoryAlgorithm, IndexType>::priv_generic_named_construct(unsigned int, const CharT*, unsigned int, bool, bool, boost::interprocess::detail::in_place_interface&, IndexType<boost::interprocess::detail::index_config<CharT, MemoryAlgorithm>

&, boost::interprocess::detail::bool_<true>)':

/x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/segment_manager.hpp:1127: parse

error before `;' token

/x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/segment_manager.hpp:1131: parse

error before `;' token

/x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/segment_manager.hpp: In

member function `void* boost::interprocess::segment_manager<CharType, MemoryAlgorithm, IndexType>::priv_generic_named_construct(unsigned int, const CharT*, unsigned int, bool, bool, boost::interprocess::detail::in_place_interface&, IndexType<boost::interprocess::detail::index_config<CharT, MemoryAlgorithm>

&, boost::interprocess::detail::bool_<false>)':

/x/eng/nbbuild3/nb/scratch/pattar/p4/aw/champagne-aquarius-ms1/src/champagne_shared/include/boost/interprocess/segment_manager.hpp:1254: parse

error before `;' token

boostManagedMapperFile.cpp: In function `int main()': boostManagedMapperFile.cpp:5: `managed_mapped_file' undeclared (first use this

function)

boostManagedMapperFile.cpp:5: (Each undeclared identifier is reported only once

for each function it appears in.)

boostManagedMapperFile.cpp:5: parse error before `(' token

Can you please let me know the following,

  1. 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

  1. Can you let me know which version of boost would this work fine on Linux platform,

Thanks in advance, Vishwanath!!

Change History (1)

comment:1 by Vishwanath <vishwap37@…>, 12 years ago

Resolution: invalid
Severity: ShowstopperNot Applicable
Status: newclosed

Problem was with wrong version of the compiler!! inconvenience regretted,

Note: See TracTickets for help on using tickets.