Undefined reference to cmph functions even after installing cpmh library

Posted by user1242145 on Stack Overflow See other posts from Stack Overflow or by user1242145
Published on 2012-03-01T08:31:12Z Indexed on 2012/06/09 22:40 UTC
Read the original article Hit count: 475

I am using gcc 4.4.3 on ubuntu. I installed cmph library tools 0.9-1 using command

sudo apt-get install libcmph-tools

Now, when I tried to compile example program vector_adapter_ex1.c , gcc is able to detect cmph.h library in its include file but is showing multiple errors like

vector_adapter_ex1.c:(.text+0x93): undefined reference to cmph_io_vector_adapter' vector_adapter_ex1.c:(.text+0xa3): undefined reference tocmph_config_new' vector_adapter_ex1.c:(.text+0xbb): undefined reference to cmph_config_set_algo' vector_adapter_ex1.c:(.text+0xcf): undefined reference tocmph_config_set_mphf_fd'

even though, these are all defined in the source code of the cmph library.

Could anyone tell the error that might have occurred or suggest an alternate method to go about building minimal perfect hash functions.

© Stack Overflow or respective owner

Related posts about header-files

Related posts about undefined-reference