Reputation: 14975
#include <apr_time.h>
Is causing the following compile error:
fatal error: apr_time.h: No such file or directory
When I do
locate apr_time.h
It outputs
/usr/include/apr-1.0/apr_time.h
So I believe I have correctly installed the library using sudo apt-get install libapr1-dev
. If I do
pkg-config --cflags --libs apr
I get
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
How do I make sure that apr_time.h
is found?
Upvotes: 0
Views: 2549
Reputation: 1612
Try using apr-1
instead of apr
.
pkg-config --cflags --libs apr-1
If you want to build, do this.
gcc `pkg-config --cflags --libs apr-1` main.c -o main
In that case, you can look for a .pc
included in the package.
dpkg -L libapr1-dev | grpe .pc
-> /usr/lib/x86_64-linux-gnu/pkgconfig/apr-1.pc
Upvotes: 0