I'm sorry, as always the problem was between keyboard and chair. I forgot to include boost/interprocess/containers/vector.hpp but there was a include <vector> somewhere and the compiler got confused Thanks for your reply, Eugen Ion GaztaƱaga wrote:
Eugen Stoianovici wrote:
I'm having some trouble creating a vector in a shared memory segment (compilation errors)
The code:
[...]
This compiles fine in Visual 2003 and should not be problems with other compilers. Which compiler/version are you using?
#include
#include #include int main(){ //Allocator for the event list typedef boost::interprocess::allocator
EventAllocator; //the in memory vector of events typedef boost::interprocess::vector
EventList; boost::interprocess::managed_shared_memory segment(boost::interprocess::open_only, "asdf"); //is it already created? EventList* pEventList = segment.find<EventList>("EVENTSEGMENT_NAME").first;
}
Regards,
Ion
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users