2008-10-14 10:33:52 UTC
Hello ,
I am currently using shmap.3.2 library. As per instruction I installed this pkg. I wrote the following program .
************************************************************************
#include <iostream>
#include <string.h>
#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;
}
*********************************************************
Compilation : g++ shmap_test.cpp -o shmap_test
While compiling I am getting following erors
/tmp/ccufFJOI.o: In function `main':
shmap_test.cpp:(.text+0x8b): undefined reference to `shmap_init(shmap_opts*)'
shmap_test.cpp:(.text+0x16b): undefined reference to `shmap_add_value(shmap*, char const*, char const*)'
shmap_test.cpp:(.text+0x1c3): undefined reference to `shmap_get_value(shmap*, char const*, int)'
I have included library path in LD_LIBRARY_PATH also.
Can anybody please help me about using shmap ???