using the shm_open() function for shared memory access in linux --regarding

Discussion in 'C Programming' started by gunasingh, Apr 5, 2008.

  1. gunasingh

    gunasingh Guest

    Hi all,

    I am using the shm_open() function declared in the <sys/mman.h>

    I get linker error saying undefined reference to shm_open()
    function...

    Can anyone tell me where can i find the definition for the method
    shm_open() ???

    Thanks,

    Gunasingh
    gunasingh, Apr 5, 2008
    #1
    1. Advertising

  2. Re: using the shm_open() function for shared memory access in linux -- regarding

    On 5 Apr 2008 at 8:58, gunasingh wrote:
    > Hi all,
    >
    > I am using the shm_open() function declared in the <sys/mman.h>
    >
    > I get linker error saying undefined reference to shm_open()
    > function...
    >
    > Can anyone tell me where can i find the definition for the method
    > shm_open() ???


    You need to link with -lrt.
    Antoninus Twink, Apr 5, 2008
    #2
    1. Advertising

  3. Re: using the shm_open() function for shared memory access in linux -- regarding

    gunasingh <> writes:
    > I am using the shm_open() function declared in the <sys/mman.h>
    >
    > I get linker error saying undefined reference to shm_open()
    > function...
    >
    > Can anyone tell me where can i find the definition for the method
    > shm_open() ???


    Since shm_open() is specified by POSIX, not by C, you're likely to get
    better information in comp.unix.programmer. Your system's
    documenation (probably "man shm_open") may also be a good source of
    information.

    --
    Keith Thompson (The_Other_Keith) <>
    Nokia
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Apr 5, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    718
    David Thompson
    Jul 14, 2008
  2. Blubaugh, David A.
    Replies:
    3
    Views:
    331
    Diez B. Roggisch
    Aug 27, 2008
  3. Blubaugh, David A.
    Replies:
    0
    Views:
    275
    Blubaugh, David A.
    Aug 26, 2008
  4. gaurav kashyap

    Regarding shared memory

    gaurav kashyap, Oct 30, 2008, in forum: Python
    Replies:
    2
    Views:
    325
    Aaron Brady
    Oct 30, 2008
  5. Victor Bazarov

    Re: [Linux] Shared memory and pointers

    Victor Bazarov, May 14, 2012, in forum: C++
    Replies:
    0
    Views:
    442
    Victor Bazarov
    May 14, 2012
Loading...

Share This Page