i have external c-library want use rubymotion (redpotion) project. have used library ruby project , used gem ffi, worked great.
however can't gem work in rubymotion (properly because not rubymotion gem). error.
uninitialized constant libdedx::ffi (nameerror)
the gem included in gemfile , code below
module test class dedx_workspace < ffi::struct layout :loaded_data, :pointer, :datasets, :int, :active_datasets, :int end end does know if possible or know way of using external c-library?
you won't able use ffi. however, there's great way use c libraries.
just wrap c functions in objective-c class , statically link in.
@interface mywrapper : nsobject - (void)somemethod; @end @implementation mywrapper - (void) somemethod { // c stuff here } @end in rakefile
app.vendor_project('vendor/mywrapper', :static)
Comments
Post a Comment