Skip to content

Strange Error #42

@applesnake

Description

@applesnake
require 'ffi'
require 'ffi/clang'
class TestStruct < FFI::Struct
  layout :a,:int,
         :b,:int,
         :c,:pointer
end

ERROR Message:

Traceback (most recent call last):
	6: from t-ffistruct.rb:3:in `<main>'
	5: from t-ffistruct.rb:4:in `<class:TestStruct>'
	4: from /usr/local/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/lib/ffi/struct.rb:218:in `layout'
	3: from /usr/local/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/lib/ffi/struct.rb:306:in `array_layout'
	2: from /usr/local/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/lib/ffi/struct.rb:266:in `find_field_type'
	1: from /usr/local/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/lib/ffi/struct.rb:272:in `find_type'
/usr/local/lib/ruby/2.6.0/mkmf.rb:1255:in `find_type': wrong number of arguments (given 1, expected 2+) (ArgumentError)

Remove: require 'ffi/clang', no error anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions