I am trying to connect to a static library and I keep getting linker errors. I found several sites that publish examples, but I could not understand what I was doing wrong.
First I create a project that will reference my lib
add> existing files
find the .xcodeproj file
select "Copy items to target groups folder" ...
Select my host project as "Add to targets."
Then I add a direct dependency on my host application
to expand the goals
double click MyHost.app
click + under direct dependencies
select my lib
Then I set the assembly flags
double-click the MyHost application icon in groups and files.
click assembly tab
then I installed OtherLinerFlag for -ObjC
then I set the header search paths to my header file for my static library.
I pass the compilation step, but any classes in my static lib cause a linker error:
literal-pointer @__ OBJC @__ cls_refs @SomeClass in MyHost.o
thank!
source
share