Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   using the shm_open() function for shared memory access in linux --regarding (http://www.velocityreviews.com/forums/t611202-using-the-shm_open-function-for-shared-memory-access-in-linux-regarding.html)

gunasingh 04-05-2008 08:58 AM

using the shm_open() function for shared memory access in linux --regarding
 
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

Antoninus Twink 04-05-2008 09:22 AM

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.


Keith Thompson 04-05-2008 09:36 AM

Re: using the shm_open() function for shared memory access in linux -- regarding
 
gunasingh <gunasingh.1@gmail.com> 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) <kst-u@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"


All times are GMT. The time now is 05:04 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.