Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CocoaPods linking "clang: error: no such file or directory: 'dynamic_lookup' and 'suppress'"

I'm getting a clang error when my project tries to link.

I can see the following flags in the Pods.debug.xcconfig and Pods.release.xcconfig

-undefined dynamic_lookup suppress

And then the error appears in issue navigator

clang: error: no such file or directory: 'dynamic_lookup'
clang: error: no such file or directory: 'suppress'

I've tried removing the following files incase it was some generated code that was causing the issues

Pods/
project.xcworkspace
pods.lockfile

and re-running pod install to re-generate the workspace and config files. The error is still appearing!

like image 544
Jonny Williamson Avatar asked Dec 02 '22 16:12

Jonny Williamson


2 Answers

I ran into something similar today with a Cocoapod project after removing it from the podfile. for some reason my workspace still had reference to the framework (now removed) so i manually deleted the references from my Build Settings > Other Linker Flags.

I got this error afterwards and the issue was in the Other Linker Flags it had -framework and on the next line it had -framework again. When i manually deleted the framework i did not remove the corresponding -framework line above it so two -framework lines were in the adjacent rows and it couldn't find the next framework (imported from CocoaPods).

Hope this helps someone some day.

like image 65
newDeveloper Avatar answered Dec 23 '22 17:12

newDeveloper


I fixed the issue. Go to Build Settings > Linking > Other Linker Flags > Debug and Release. Make sure all you have is $(inherited).

like image 38
TYRONEMICHAEL Avatar answered Dec 23 '22 17:12

TYRONEMICHAEL