致命错误:apr_time.h:没有这样的文件或目录

时间:2014-10-11 16:32:37

标签: compiler-errors cmake

#include <apr_time.h>

导致以下编译错误:

fatal error: apr_time.h: No such file or directory

当我这样做时

locate apr_time.h

输出

/usr/include/apr-1.0/apr_time.h

所以我相信我已经使用sudo apt-get install libapr1-dev正确安装了库。如果我做

pkg-config --cflags --libs apr

我得到了

Package apr was not found in the pkg-config search path.
Perhaps you should add the directory containing `apr.pc'
to the PKG_CONFIG_PATH environment variable
No package 'apr' found

如何确保找到apr_time.h

1 个答案:

答案 0 :(得分:2)

尝试

#include <apr-1.0/apr_time.h>

代替。