I tried to compile the following code on ubuntu 11.04:
#include #include int main()
shm_open is made available by linking librt. Try passing -lrt flag to the linker.
Try: g++ -c -Wall shared.cpp
g++ -L /lib -lrt shared.o -o shared