Search code examples
xcodestatic-librariesobjective-c++libstdc++

Using Objective-C++ static library in straight Objective-C target


I build a static library that uses Objective-C++. When it is used in a straight Objective-C target, I get

Undefined symbols:
  "___gxx_personality_v0", referenced from:

I can solve this by adding -lstdc++ to the target's "Other Linker Flags".

Question: Is there a way to specify this in the static library itself to make this step unnecessary? (Otherwise, I have to document it as an extra step for users of the library.)


Solution

  • And the answer is… no. Document the flags your library requires.