+#include <stdio.h><br>+#include "auparse.h"<br>+#include <stdlib.h><br>+#include <malloc.h><br><br>int main() <br>{<br>    auparse_state_t *au; <br><br>    au = auparse_init(AUSOURCE_LOGS, NULL);<br>
    if (au == NULL) <br>        exit(1);<br><br>    if (!ausearch_set_param(au, "auid", "=", "500", AUSEARCH_STOP_EVENT)) <br>        exit(1);<br><br>    while (ausearch_next_event(au)) {<br>
        if (auparse_find_field(au, "auid")) {<br>            printf("auid=%s\n", auparse_interpret_field(au));<br>        }<br>    }<br>    auparse_destroy(au);<br>}<br><br><br><br>I tried the above program for but after compilation its giving following linking error.<br>
<br>/tmp/ccMo3ClJ.o: In function `main':<br>parselib.c:(.text+0x21): undefined reference to `auparse_init'<br>parselib.c:(.text+0x61): undefined reference to `ausearch_set_param'<br>parselib.c:(.text+0x84): undefined reference to `auparse_find_field'<br>
parselib.c:(.text+0x93): undefined reference to `auparse_interpret_field'<br>parselib.c:(.text+0xae): undefined reference to `ausearch_next_event'<br>parselib.c:(.text+0xbd): undefined reference to `auparse_destroy'<br>
collect2: ld returned 1 exit status<br><br><br>Do help.......<br>