开发者

MacRuby: load cocoa bundle

I created a custom cocoa bundle. But when i try to load the bundle into MacRuby project,I get the following err

dyld: Library not loaded: audio_streamer.bundle Referenced from: /Users/sgopinath/workspace002/UplayaDesktopR开发者_StackOverflowadio/build/Debug/UplayaDesktopRadio.app/Contents/MacOS/UplayaDesktopRadio Reason: image not found

I created the bundle using the following command gcc audio_streamer.m -o audio_streamer.bundle -g -framework Foundation -dynamiclib - fobjc-gc -arch i386 -arch x86_64

I could load the bundle from macirb , but not from actual xcode project which is intended to use it.

Any suggestions


You might want to look at this tutorial: http://www.macruby.org/recipes/create-an-objective-c-bundle.html

I would also check how you are loading the bundle, remember that the resources are available from the resource path: NSBundle.mainBundle.resourcePath.fileSystemRepresentation

By default, the rb_main.rb file only loads rb/rbo files so your bundle won't be automatically loaded. You can modify the code requiring the files or you can manually require your bundle.

I hope that helps

  • Matt
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜