views:

62

answers:

1

hi , 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/UplayaDesktopRadio/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

+1  A: 

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
Matt Aimonetti