I’m trying to import a .h file from an old xcode project into my current one. The file location is the same as the other files in the project (I moved it there), but after using #import in my program body file, when I try to run the program I get the following fail:
“_OBJC_CLASS_$_Fraction”, referenced from:
objc-class-ref-to-Fraction in 9.1main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Does anyone know how to fix this? Thanks!
Assuming that you also added Fraction.m to the project,
In the Group & Files view, select Fraction.m
Show the Editor view (Menu–>View–>Zoom Editor Out)
Select the Detail tab. There you should (again) see the Fraction.m file.
At the far right of the column there is a tiny target symbol. Make sure that column has a checkmark.
That ensures that your class Fraction is included when Xcode builds the app.