i am new to tokyo cabinet and i have installed it and i have run the example c program i am getting error... while i compile with gcc
gcc -O tcadbex.c
/tmp/cc7IEOht.o: In function `main':
tcadbex.c:(.text+0xd): undefined reference to `tcadbnew'
tcadbex.c:(.text+0x1f): undefined reference to `tcadbopen'
tcadbex.c:(.text+0x58): undefined reference to `tcadbput2'
tcadbex.c:(.text+0x74): undefined reference to `tcadbput2'
tcadbex.c:(.text+0x90): undefined reference to `tcadbput2'
tcadbex.c:(.text+0xc1): undefined reference to `tcadbget2'
tcadbex.c:(.text+0x10e): undefined reference to `tcadbiterinit'
tcadbex.c:(.text+0x11c): undefined reference to `tcadbget2'
tcadbex.c:(.text+0x156): undefined reference to `tcadbiternext2'
tcadbex.c:(.text+0x164): undefined reference to `tcadbclose'
tcadbex.c:(.text+0x18d): undefined reference to `tcadbdel'
collect2: ld returned 1 exit status
can any one tell me what is the issues with this...
Yes, you will almost certainly have to link with the library files for Tokyo Cabinate (whatever that is).
Typically, you would use a command like:
where:
-L
specifies search paths for libraries.-l
lists libraries to search for undefined symbols.and the linker will go looking for the libraries, following certain rules for turning
xyz
into a file name likelibxyz.so
.In fact, a search of the net turns up this (on one line, I'm just splitting it for readability):
as the command line to use.
so I would suggest that you need for your specific case (again, on one line):