How do I access any classes in a library when all I have is the .a file? I've included the -ObjC linker flag and added the .a file to my project. Still, none of the classes appear in code hints.
+3
A:
If you mean Code Sense/autocompletion, IIRC they're based off of included headers. If you don't have the headers, you won't get the hints.
Wevah
2009-11-18 03:33:25
I see. I tried a method on a static class but it says the class is undeclared.
4thSpace
2009-11-18 03:39:15
Was it a linker error, or a compiler error? If it was the latter, can declare the class and its methods yourself (e.g., in your own separate header file).
Wevah
2009-11-18 03:44:21
Including the header works. So, in order to use the .a file, you must include its header files? It isn't self contained? I see you can also step through the code in the .a file as well.
4thSpace
2009-11-18 04:37:45
Yes, headers are needed for static libraries as they are for frameworks. Unfortunately, we can't bundle headers with the libraries like we can with frameworks, so they need to be provided separately.
Brad Larson
2009-11-18 11:49:42
+1 For answering the subquestion first. :)
Wevah
2009-11-18 12:09:12