Reputation: 4819
I'm trying to integrate MetatoneOSC into a brand new Swift iOS project.
What I've done so far:
#import "MetatoneOSC/F53OSC.h"
ViewController.swift
:let client = F53OSCClient.init()
The build fails with the following error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_F53OSCClient", referenced from:
type metadata accessor for __ObjC.F53OSCClient 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)
Each new class I use in my code creates a duplicate error, with a different class name after $_F53OSC
in the error message.
I have tried setting up a new Objective-C project to make sure it's not a bridging error, and I get exactly the same error. Anyone know how I can resolve this?
Upvotes: 2
Views: 4830
Reputation: 299265
This generally means you forgot to compile the relevant .m
file. In you "Build Phases > Compile Sources" step for the target, make sure you've included all the relevant files. This doesn't always happen automatically if you just drag them into the project.
Upvotes: 2