Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjectiveC linking issue #4277

Closed
mattevigo opened this issue Feb 5, 2018 · 1 comment
Closed

ObjectiveC linking issue #4277

mattevigo opened this issue Feb 5, 2018 · 1 comment

Comments

@mattevigo
Copy link

Following the objectivec integration guide in a new project: https://github.com/google/protobuf/blob/master/objectivec/README.md#building

XCode exits with the following linking error:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_GPBDuration", referenced from:
      l_OBJC_CLASSLIST_SUP_REFS_$_.28 in GPBWellKnownTypes.o
      l_OBJC_$_CATEGORY_GPBDuration_$_GBPWellKnownTypes in GPBWellKnownTypes.o
  "_OBJC_CLASS_$_GPBAny", referenced from:
      l_OBJC_$_CATEGORY_GPBAny_$_GBPWellKnownTypes in GPBWellKnownTypes.o
  "_OBJC_CLASS_$_GPBTimestamp", referenced from:
      l_OBJC_CLASSLIST_SUP_REFS_$_ in GPBWellKnownTypes.o
      l_OBJC_$_CATEGORY_GPBTimestamp_$_GBPWellKnownTypes in GPBWellKnownTypes.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can you help please?

@thomasvl
Copy link
Contributor

thomasvl commented Feb 7, 2018

Sorry about that, at one point those generated files weren't nested, and when that changed the docs never got updated. They should be correct now. You also need the headers/sources in objectivec/google/protobuf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants