Giter Site home page Giter Site logo

Comments (4)

defagos avatar defagos commented on June 8, 2024

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:

  1. Add the CoconutKit/Sources and CoconutKit/Resources folders to your project
  2. Open CoconutKit-dev-Prefix.pch, copy all #import directives, and paste them into your project .pch file

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.

from coconutkit.

tiago-g-henriques avatar tiago-g-henriques commented on June 8, 2024

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.

from coconutkit.

defagos avatar defagos commented on June 8, 2024

Well, it works as well:

  1. Add CoconutKit.xcodeproj to your project
  2. Link your project with libCoconutKit.a (target -> Build Phases -> Link Binary With Libraries)
  3. Add -ObjC to your project / target "Other linker flags" settings. -all_load might be needed as well, though -ObjC was sufficient when I tested it
  4. Add /path/where/you/store/CoconutKit_1.1.3/CoconutKit/Sources/** to the Header Search Paths
  5. Link your project against CoreData.framework, MessageUI.framework and QuartzCore.framework as well
  6. Where you want to use some CoconutKit feature, #import "HeaderFile.h". Alternatively, you may want to open CoconutKit-dev-Prefix.pch, copy all #import directives, and paste them into your project .pch file

from coconutkit.

tiago-g-henriques avatar tiago-g-henriques commented on June 8, 2024

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!

from coconutkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.