Reputation: 803
I'm attempting to run a project from git hub (https://github.com/dulaccc/DPMeterView). The issue arises after cloning the repository and using 'pod install' to install the dependencies. I'm receiving this error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_DPMeterView", referenced from: objc-class-ref in ViewController.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm having a tough time finding a solution. Any thoughts? Thanks in advance!
Upvotes: 0
Views: 288
Reputation: 11
For https://github.com/dulaccc/DPMeterView,
The example project is missing $(inherited) under "Other Linker Flags"
Once you add $(inherited), run pod install and it should compile afterwards.
Upvotes: 0
Reputation: 2874
Since the obvious solution hasn't been written as an answer, I will do that.
Anytime you get an "undefined symbol" error, that indicates that you have not told the linker to add that symbol to your binary. How do you tell the linker to add it? Well, perhaps the easiest way is to tell the compiler to build your source file.
In Xcode, this is done in the Compile Sources
pane, which looks like this:
On the command line, you can do it like this:
clang source1.c source2.c source3.c etc.c
Upvotes: 1