How to compile a system program using libsystemd-dev?
I'm trying to compile a simple system program on Ubuntu 16.04 that uses the systemd native API calls for Journal logging.
I installed the libsystemd-dev package using the Software Manager, but don't know how to connect to the libraries it provides. For example, when I use the compiler directives `pkg-config --cflags --libs libsystemd-journal` that the blog "systemd for developers III" gives me, I get the following error:
Package libsystemd-journal was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsystemd-
to the PKG_CONFIG_PATH environment variable
No package 'libsystemd-
I am compiling the provided Journal logging example found in the blog "systemd for developers III", as follows:
#include <systemd/
int main(int argc, char *argv[]) {
return 0;
}
Any help would be greatly appreciated!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Colin Watson
- Solved:
- Last query:
- Last reply: