2

trying to use audit_token_to_pid in objective c code . I have included #import <bsm/libbsm.h>

but when I build the project i am seeing following build error : Undefined symbol: _audit_token_to_pid

may be I require some library but not sure how to resolve this ??

Baab
  • 179
  • 6

1 Answers1

2

#import is not enough. Read What is the difference between include and link when linking to a library? and search for similar questions.

You have to link binary with this library:

enter image description here

Select your target, switch to Build Phases and add libbsm to Link Binary with Libraries section.

Or add -l bsm to clang command line options.

zrzka
  • 20,249
  • 5
  • 47
  • 73