Boost logo

Boost Users :

Subject: [Boost-users] Problem compiling boost libraries
From: Daniel Veneros (dann.vd_at_[hidden])
Date: 2010-01-28 10:32:11


Hi, I´m trying to compile a simple example in NetBeans 6.8 on Solaris
platform, the code is:
 struct shm_remove
      {
         shm_remove() { shared_memory_object::remove("MySharedMemory"); }
         ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
      } remover;

      //Create a shared memory object.
      shared_memory_object shm (create_only, "MySharedMemory", read_write);

      //Set size
      shm.truncate(1000);

      //Map the whole shared memory in this process
      mapped_region region(shm, read_write);

      //Write all the memory to 1
      std::memset(region.get_address(), 1, region.get_size());

      //Launch child process
      std::string s(argv[0]); s += " child ";
      if(0 != std::system(s.c_str()))
         return 1;

That's it, no big deal, but when I try to build this I receive the error:
Undefinded first referenced symbol in file shm_unlink, sched_yield, shm_open

Anyone knows how can I fix this??
Thanks!!!

Dann



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