Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Dylib or Bundle on OS X?
Shane Liesegang
7/5/2007 5:10:00 AM
Background: I'm trying to embed a Ruby interpreter in my C++
application. (I know, join the club, right?) My query to (and helpful
response from) the SWIG user list is here:
<
http://www.nabble.com/Embedded-interpreter-with-shared-objects-tf402665...
(there's some sample code there as well)
In short, I've got a singleton in C++ which I'm trying to reflect out
into Ruby. The problem is that the Ruby interpreter loads up a second
copy of the library so that the singleton isn't properly shared across
C++ and Ruby. The SWIG list recommended splitting off the wrapped
classes into their own dynamic library that both the executable and the
Ruby module can include.
I'm not sure, though, how to bind the code up in such a way that both an
OS X application and Ruby would be happy working with it. Ruby wants a
bundle, and my attempts to link the dylib into a bundle have just
yielded bad memory access when I try and require it.
Can anyone offer some insight on the best way to accomplish this? Should
I be looking at Frameworks or some other tech instead, or is there a
good way to set up a bundle that references a dylib so that Ruby can
load it as a module?
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Dylib or Bundle on OS X?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password