From: Mat Schaffer Date: 2007-02-28T12:49:15+09:00 Subject: Re: a little help with importing c library On Feb 27, 2007, at 6:24 PM, Tea Figuric wrote: > It's a C wrapper library for a C++ library that has just a few > functions > for now. > > I am stuck at the beginning :) > My library is called qfinterface.dll and I would like to call the > function CreateSession(const char *) that returns an int, and pass > it a > string. > > I mostly get the error "uninitialized constant" when trying to call > the > function, and I've tried so many different things, that I am losing > track of what I tried and what not. right now I get "undefined local > variable or method" I'm assuming you've read README.ext already? http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/RUBY/README.EXT? view=markup Have you investigated using the inline library? It might make more sense if you just need a few functions. http://www.zenspider.com/ZSS/Products/RubyInline/ Using C from Ruby is a bit more complex than just regular ruby programming, but hopefully those links can get you started. -Mat