GHUnit testing against an application that uses a library
I'm trying to build some GHUnit tests based on an iOS application I have which uses ProtocolBuffers, accessed as a library. I've run into lots of linker problems which I've slowly killed off by adding the source files from the application to the "Compile Sources" build phase, but now that I've added everything relevant in the application, I have found that I can't seem to link against ProtocolBuffers.
I have read GH-Unit for unit testing Objective-C code, why am I getting linking errors? wherein the poster seems to have fixed his situation based on the README update at the bottom. Since I have a hybrid - I am linking GHUnit against both an application and a library, I started with the assumption that I should add the ProtocolBuffers output as a dependency in addition to adding all the application source files to my "Compile Sources" build phase.
This hasn't worked. I continue to get linker errors which clearly show that the linker isn't finding symbols from the ProtocolBuffers library. I can't add the ProtocolBuffers source files because they're not in this project, and even adding #import "ProtocolBuffers.h" to my tests.pch file doesn't work.
I'm now stumped. Any suggestions? GHUnit looks great but, as it se开发者_运维百科ems to always be with Xcode/ObjC testing tools, getting to "Hello World" is more trouble that I would expect.
精彩评论