It says "undefined reference to:" to all of unnamed semaphores functions, sem_init, sem_wait, sem_post, sem_destroy. I have it linked with librt (-lrt) so it should know that functions. Now I have tried to link with with pthread and it compiles. But yet it can't initialize semaphore.

Jan