Fedora Linux Support Community & Resources Center
Old 16th October 2008, 07:59 AM
deepati Offline
Registered User
Join Date: Jun 2008
Posts: 1
Regarding Shared Memory

Hello All,
I have installed shmap library in which we can write into map through shared memory. I got it from open source. I wrote a program based on it's APIs. While compiling I am getting some linking errors. The description is below ...


PROGRAM : Shmap.cpp
#include <iostream>
#include <string.h>
#include "/usr/local/include/shmap.h"

using namespace std;

int main()
shmap_opts *p_opts;
shmap *sample_map;

sample_map = shmap_init ( p_opts );
string name = "deepak";
char const *conv_name = name.c_str();
string value = "3";
char const *conv_value = value.c_str();

int add_chck = shmap_add_value ( sample_map, conv_name , conv_value);
cout<<"AFTER ADDITION VALUE = "<<add_chck<<endl;

void *get_chck;
int cached = 1;
get_chck = shmap_get_value( sample_map, conv_name, cached );
cout<<"VALUE GOT = "<<get_chck<<endl;

return 0;


g++ Shmap.cpp -o Shmap

/tmp/cc6v4tBa.o: In function `main':
Shmap.cpp.text+0x8b): undefined reference to `shmap_init(shmap_opts*)'
Shmap.cpp.text+0x16b): undefined reference to `shmap_add_value(shmap*, char const*, char const*)'
Shmap.cpp.text+0x1c3): undefined reference to `shmap_get_value(shmap*, char const*, int)'
collect2: ld returned 1 exit status

Can anybody guide me on this ???
Reply With Quote

memory, shared

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
shared memory variable.. Maninder Using Fedora 0 9th April 2008 01:44 PM
Shared Memory problem with fglrx Friketrike Hardware & Laptops 0 11th February 2007 12:49 AM
no shared memory in FC4 hipcat7173 Using Fedora 2 11th January 2006 10:28 AM
posix shared memory , help me! melihbirim Programming & Packaging 1 7th January 2005 11:53 PM

Current GMT-time: 04:13 (Sunday, 20-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat