|
Boost Users : |
Subject: [Boost-users] [interprocess] managed_mapped_file under cygwin
From: Bob Walters (bob.s.walters_at_[hidden])
Date: 2009-05-18 13:44:45
>From what I've read, cygwin supports mmap, and so I figured there was
a chance that boost::interprocess::managed_mapped_file was valid on
windows when compiling with cygwin.
I've built the boost libraries using cygwin with boost_1_39_0, using a
user-config.bjam with:
using gcc : cygwin_4.3.2 : /usr/bin/g++-4 :
<compileflags>-DBOOST_POSIX_API
<compileflags>-DBOOST_POSIX_PATH
;
Under cygwin, I have
g++ 3.4.4
g++-4 4.3.2
I think you can reproduce this with a source file that just includes
<boost/interprocess/managed_mapped_file.hpp>
I'm getting the following compile error:
g++-4 -DHAS_STDINT_H -I/cygdrive/c/workspaces/cdds_head/stldb_lib
-I/cygdrive/c/c++/boost_1_39_0 -O0 -g3 -Wall -c -fmessage-length=0
-MMD -MP -MF"database.d" -MT"database.d" -o"database.o"
"../database.cpp"
(I also get this with g++)
In file included from
C:\C++\boost_1_39_0/boost/interprocess/detail/managed_open_or_create_impl.hpp:17,
from
C:\C++\boost_1_39_0/boost/interprocess/managed_mapped_file.hpp:20,
from
C:\workspaces\cdds_head\stldb_lib/stldb/containers/trans_map.h:23,
from ../trans_map.h:18,
from ../database.h:13,
from ../database.cpp:8:
C:\C++\boost_1_39_0/boost/interprocess/mapped_region.hpp: In
constructor 'boost::interprocess::mapped_region::mapped_region(const
MemoryMappable&, boost::interprocess::mode_t,
boost::interprocess::offset_t, size_t, const void*)':
C:\C++\boost_1_39_0/boost/interprocess/mapped_region.hpp:403: error:
request for member 'is_xsi' in 'map_hnd', which is of non-class type
'boost::interprocess::mapping_handle_t'
C:\C++\boost_1_39_0/boost/interprocess/mapped_region.hpp:406: error:
request for member 'handle' in 'map_hnd', which is of non-class type
'boost::interprocess::mapping_handle_t'
The above suggests that in detail/os_file_functions.hpp,
mapping_handle_t is being given the windows definition rather than the
posix definition, somehow. However, I've also noticed that if I
#include <boost/interprocess/windows_shared_memory.hpp>, I do trip the
#error caused by !defined(BOOST_INTERPROCESS_WINDOWS), so that proves
that it isn't, in which case I don't quite understand where this error
is coming from.
Any help is appreciated.
Thanks,
- Bob Walters
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net