[MacRuby-devel] c++ lib

Louis-Philippe default at spiralix.org
Thu May 27 07:25:05 PDT 2010


So far, I got my c++ sdk in a framework (without objc wrapper) I can call it
from objective-c...
but macruby is not happy with it, importing it with 'framework
"./MYSDK.framework"', I get:

RuntimeError: framework at path `./MYSDK.framework' cannot be loaded: Error
Domain=NSCocoaErrorDomain Code=3585 UserInfo=0x2002b5080 "The bundle
“MYSDK.framework” couldn’t be loaded because it doesn’t contain a version
for the current architecture."
(dlopen_preflight(/PATH/MYSDK.framework/MYSDK): no suitable image found.
 Did find:
/PATH/MYSDK.framework/MYSDK: mach-o, but wrong architecture)
from /PATH/(irb):2:in `<main>'

2010/5/26 Thibault Martin-Lagardette <thibault.ml at gmail.com>

> Hi!
>
> That's exactly what I was going to recommend.
> MacRuby is able to interact with Obj-C, so you can write an Obj-C++ wrapper
> (.mm files) around your SDK, and then use it with MacRuby :-)
>
> Any of you two, if you manage / managed to do it, please do not hesitate
> sharing the recipe to the world :-).
>
> --
> Thibault Martin-Lagardette
>
>
>
> On May 26, 2010, at 11:31, Gregoire LEJEUNE wrote:
>
> > I do it with a C lib (but it must be the same with C++). First I
> > create a ObjC class over my C lib. Then i can use my ObjC class within
> > MacRuby.
> >
> > Greg
> >
> > 2010/5/26 Louis-Philippe <default at spiralix.org>:
> >> Hi folks,
> >> I need to work with a c++ sdk in my code.
> >> Is this possible within macruby?
> >> I tried loading the files all sorts of way and making a bundle with it
> and
> >> got no luck at this point...
> >> thanks!
> >> L-P
> >> _______________________________________________
> >> MacRuby-devel mailing list
> >> MacRuby-devel at lists.macosforge.org
> >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> >>
> >>
> > _______________________________________________
> > MacRuby-devel mailing list
> > MacRuby-devel at lists.macosforge.org
> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100527/7d04b5d5/attachment.html>


More information about the MacRuby-devel mailing list