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

Ah, duplicate library ? problem ? #1

Open
smhk opened this issue Dec 20, 2018 · 2 comments
Open

Ah, duplicate library ? problem ? #1

smhk opened this issue Dec 20, 2018 · 2 comments

Comments

@smhk
Copy link

smhk commented Dec 20, 2018

This runs perfectly, build to a device and run.

However when you Archive the project, unfortunately:

Image

ld: 57 duplicate symbols for architecture arm64

So, VideoUtil.o has many dupes (with AVError.o, AudioUtil.o etc etc) such as _swift_AVERROR_HTTP_OTHER_4XX etc.

any easy fix ?!


  • I did try changing "No Common Blocks" compiler setting to NO; didn't help
@sunlubo
Copy link
Owner

sunlubo commented Dec 21, 2018

I don't know why this problem occurs. But you can add static specifier to these declarations to solve this problem. e.g. const int swift_AVERROR_BSF_NOT_FOUND = AVERROR_BSF_NOT_FOUND; => static const int swift_AVERROR_BSF_NOT_FOUND = AVERROR_BSF_NOT_FOUND;.

@smhk
Copy link
Author

smhk commented Dec 21, 2018

Thanks a lot for that.

As sunlubo explains to solve this

  1. go to file avutil_shim.h

  2. every const becomes static const

  3. there are 57 of them to change

it might even be a soft apple bug, because, it seems to "happen sometimes yes/no" if you just keep starting fresh as an experiment.

anyway SUN LUBO ROCKS as usual

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

No branches or pull requests

2 participants