我正在尝试使用cmph库在我的代码中使用完美的哈希函数,我正在尝试运行简单示例http://cmph.sourceforge.net/examples/file_adapter_ex2.c
我通过从网站下载cmph包来安装库,并且
但是当我尝试运行上述程序时,我收到以下错误。
致命错误:找不到'cmph.h'文件
然后我通过-I标志指定'/ usr / local / include'路径解决了这个问题,但我得到另一个问题如下:
Undefined symbols for architecture x86_64:
"_cmph_config_destroy", referenced from:
_main in cmph_try1-b75410.o
"_cmph_config_new", referenced from:
_main in cmph_try1-b75410.o
"_cmph_config_set_algo", referenced from:
_main in cmph_try1-b75410.o
"_cmph_destroy", referenced from:
_main in cmph_try1-b75410.o
"_cmph_io_nlfile_adapter", referenced from:
_main in cmph_try1-b75410.o
"_cmph_io_nlfile_adapter_destroy", referenced from:
_main in cmph_try1-b75410.o
"_cmph_new", referenced from:
_main in cmph_try1-b75410.o
"_cmph_search", referenced from:
_main in cmph_try1-b75410.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
任何帮助都将不胜感激。