New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding CoconutKit project to my workspace #6
Comments
If you want your project to use CoconutKit sources only, you must not add libCoconutKit.a to your project (after all, that's the compiled library), you must only use .m and .h files (and resources files). I do not recommend using CoconutKit this way since you will basically compile everything from scratch every time you clean & build your project. If you still want to use CoconutKit as source files, here is how:
If you are trying to use CoconutKit as a static library file and a set of header files, I strongly recommend sticking to the .staticframework I provide. The .staticframework binaries include special tricks so you do not run into linking issues (have a look at the CoconutKit_bootstrap.m file). If you want to use the static library file without those linking issues, you will need to add the -ObjC and -all_load flags to your project linker flags (which you do not need to do with the .staticframework). There is an associated space overhead, though, which you won't pay if you use the .staticframework. |
Hmmm, manually adding references to my project is precisely what I was trying to avoid. I usually try to add project dependencies as git submodules and as separate projects in a workspace. |
Well, it works as well:
|
I was doing most of what you recommended, except for adding the "-ObjC" linker flag, which turns out to be crucial if you're using Categories from your linked library. That's why I was getting an exception when using the className method from NSObject+HLSExtensions.h. It now works. Thanks for the help! |
I'm trying to convert a small demo project that uses version 1.1.3 of the static framework to a project that uses the CoconutKit sources directly. I created an empty workspace, added my project and the CoconutKit project to it, added the libCoconutKit.a library to the application link phase and added "CoconutKit/CoconutKit/**" to the User Header Search Paths.
The first problem was that the global import of <CoconutKit/CoconutKit.h> no longer works — it seems like this file is generated automatically.
I tried adding everything from the CoconutKit-dev-Prefix.pch to my own prefix file, and my application now builds and runs, but crashes immediately with an uncaught exception:
'NSInvalidArgumentException', reason: '-[LifeCycleTestViewController className]: unrecognized selector sent to instance 0x896cd90'
Is this a completely wrong approach, or is there some small detail I need to add?
The text was updated successfully, but these errors were encountered: