[haiku-3rdparty-dev] Haiku shmget, shmat, shmctl problems on linking

  • From: Michael Oliveira <michaelvoliveira@xxxxxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Fri, 27 Nov 2009 21:07:29 -0800 (PST)

Hi! 

somebody can give me a light?

I have the following piece of code

#include <sys/ipc.h>

...

shmid = shmget(IPC_PRIVATE, len, SHM_R | SHM_W);
    if (shmid == -1) {
        printf("can't get shared memory\n");
        exit(1);
    }
    state = (struct state *)shmat(shmid, 0, 0);
    if (!state || state == (struct state *)-1) {
        printf("can't attach to shared memory\n");
        exit(1);
    }
    shmctl(shmid, IPC_RMID, 0);

 

the compiler gives me warning of implicit declaration

at the end, these 3 functions doesn't link against libroot

Why?


Atenciosamente,


Michael Vinícius de Oliveira



      
____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

Other related posts: