
I'm having some trouble creating a vector in a shared memory segment (compilation errors) The code: int main(){ //Allocator for the event list typedef boost::interprocess::allocator <int,managed_shared_memory::segment_manager> EventAllocator; //the in memory vector of events typedef boost::interprocess::vector<int, EventAllocator> EventList; //is it already created? EventList* pEventList = segment.find<EventList>(EVENTSEGMENT_NAME).first; } The error: d:\boost_1_35_0\boost\preprocessor\iteration\detail\local.hpp(37): error C2036: 'EventList *' : unknown size And the trace: DataHandle.cpp(53) : warning C4101: 'ex' : unreferenced local variable d:\boost_1_35_0\boost\interprocess\mem_algo\rbtree_best_fit.hpp(353) : see reference to class template instantiation 'boost::interprocess::rbtree_best_fit<MutexFamily,VoidPointer,MemAlignment>' being compiled d:\boost_1_35_0\boost\preprocessor\iteration\detail\local.hpp(37) : error C2036: 'EventList *' : unknown size d:\boost_1_35_0\boost\preprocessor\iteration\detail\local.hpp(37) : see reference to class template instantiation 'boost::interprocess::vector<T,A>' being compiled with [ T=int, A=EventAllocator ] d:\boost_1_35_0\boost\preprocessor\iteration\detail\local.hpp(37) : while compiling class-template member function 'void boost::interprocess::detail::Ctor1Arg<T,is_iterator,P0>::construct_n(void *,size_t,size_t &)' with [ T=EventList, is_iterator=false, P0=EventAllocator ] d:\boost_1_35_0\boost\preprocessor\iteration\detail\local.hpp(37) : see reference to class template instantiation 'boost::interprocess::detail::Ctor1Arg<T,is_iterator,P0>' being compiled with [ T=EventList, is_iterator=false, P0=EventAllocator ] DataHandle.cpp(51) : see reference to function template instantiation 'T *boost::interprocess::detail::named_proxy<SegmentManager,T,is_iterator>::operator ()<EventAllocator>(const P0 &) const' being compiled with [ T=EventList, SegmentManager=boost::interprocess::segment_manager<char,boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family>,boost::interprocess::iset_index>, is_iterator=false, P0=EventAllocator ]