unknown type error in ext/dl (types.rb:174)

G

Gully Foyle

I have a simple c library with 4 functions and would like to call one of
them from ruby using ext/dl.

The problem is, one of the internal functions (which I don't need to
access from ruby) uses a data type that causes the following error in ruby:

types.rb:174:in `encode_type': unknown type: foo_struct *foo. (TypeError)

What is the easiest way around this error? Is it possible to 'hide' one
or more c functions in the shared library so that ruby's ext/dl will
just ignore it?

All the wrapper functions simply use int, long and char*--nothing fancy.

I'm using gcc 3.2.x and plain c.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top