rubymotion-community / Joybox

Cocos2D & Box2D Wrapper for Ruby Motion - Currently out of date an unmaintained :-(
MIT License
280 stars 37 forks source link

Trouble with vendor files #33

Closed TheOddLinguist closed 11 years ago

TheOddLinguist commented 11 years ago

I'm trying to use CCControlExtension (https://github.com/YannickL/CCControlExtension) with a Joybox project. I've copied the directory into vendor and added this to my Rakefile:

Motion::Project::App.setup do |app|
  # Other stuff
  # ...
  app.vendor_project('vendor/CCControlExtension', :static)
end

...but it doesn't like that:

   Compile vendor/CCControlExtension/CCControl/CCControl.m
In file included from CCControl/CCControl.m:27:
CCControl/CCControl.h:28:9: fatal error: 'cocos2d.h' file not found
#import "cocos2d.h"
        ^

Is there a way to point the header file to Joybox's Cocos2D? Or some other fix, perhaps? Thanks.

NSCoder commented 11 years ago

Hey Christopher!

I think the best approach to include the Control Extension into Joybox will be compile it as a static library and then include the library into your project. The reason of this is that the Control Extension is expecting to have the obj-c cocos2d library directly into the xcode project.

Another solution may be to include the header files (/vendor/cocos2d/headers) into the CCControlExtension project.

I hope it helps

JK

TheOddLinguist commented 11 years ago

Thanks. I'm not actually sure how you'd go about doing that, but I figured I'd close this issue since it's probably sufficiently resolved for anyone else. hehe