rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

the name <whatever> is defined multiple times + cannot find `T` in this scope

Open LoganDark opened this issue 5 years ago • 5 comments

Input C/C++ Header

#include <wx/wx.h>

really sorry for the include. I just don't know how to reproduce this minimally. It's just wxWidgets 3.1.3, built from source on macOS 10.14.6.

Bindgen Invocation

bindgen::Builder::default()
	.header("wrapper.hpp")
	.detect_include_paths(false)
	.clang_args(cxx_flags)
	.parse_callbacks(Box::new(bindgen::CargoCallbacks))
	.whitelist_type("wx.*")
	.opaque_type("(::)?std::.*")
	.generate()
	.expect("Couldn't make bindings!");

Actual Results

error[E0428]: the name `CharType` is defined multiple times
     --> wxRust_sys/src/bindings.rs:68988:1
      |
68930 | pub type CharType = ::std::os::raw::c_char;
      | ------------------------------------------- previous definition of the type `CharType` here
...
68988 | pub type CharType = u32;
      | ^^^^^^^^^^^^^^^^^^^^^^^^ `CharType` redefined here
      |
      = note: `CharType` must be defined only once in the type namespace of this module

error[E0428]: the name `pointer` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69028:1
      |
69027 | pub type pointer = pointer;
      | --------------------------- previous definition of the type `pointer` here
69028 | pub type pointer = type_;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^ `pointer` redefined here
      |
      = note: `pointer` must be defined only once in the type namespace of this module

error[E0428]: the name `type_` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69030:1
      |
69029 | pub type type_ = type_;
      | ----------------------- previous definition of the type `type_` here
69030 | pub type type_ = pointer;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^ `type_` redefined here
      |
      = note: `type_` must be defined only once in the type namespace of this module

error[E0428]: the name `pointer` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69031:1
      |
69027 | pub type pointer = pointer;
      | --------------------------- previous definition of the type `pointer` here
...
69031 | pub type pointer = *mut u32;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `pointer` redefined here
      |
      = note: `pointer` must be defined only once in the type namespace of this module

error[E0428]: the name `const_pointer` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69147:1
      |
69146 | pub type const_pointer = const_pointer;
      | --------------------------------------- previous definition of the type `const_pointer` here
69147 | pub type const_pointer = type_;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_pointer` redefined here
      |
      = note: `const_pointer` must be defined only once in the type namespace of this module

error[E0428]: the name `type_` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69148:1
      |
69029 | pub type type_ = type_;
      | ----------------------- previous definition of the type `type_` here
...
69148 | pub type type_ = const_pointer;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `type_` redefined here
      |
      = note: `type_` must be defined only once in the type namespace of this module

error[E0428]: the name `const_pointer` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69149:1
      |
69146 | pub type const_pointer = const_pointer;
      | --------------------------------------- previous definition of the type `const_pointer` here
...
69149 | pub type const_pointer = *const u32;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_pointer` redefined here
      |
      = note: `const_pointer` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69365:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
69365 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69406:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69406 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69407:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69407 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69408:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
69408 | pub type value_type = ::std::os::raw::c_char;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69448:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69448 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69449:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69449 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69450:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
69450 | pub type value_type = ::std::os::raw::c_short;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69490:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69490 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69491:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69491 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69492:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
69492 | pub type value_type = ::std::os::raw::c_int;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69532:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69532 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69533:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69533 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69534:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
69534 | pub type value_type = ::std::os::raw::c_long;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69574:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69574 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69575:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69575 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69576:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
69576 | pub type value_type = ::std::os::raw::c_ulong;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69616:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69616 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69617:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69617 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69618:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
69618 | pub type value_type = f64;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69814:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69814 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69815:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69815 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69816:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
69816 | pub type value_type = *mut ::std::os::raw::c_void;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69877:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69877 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69878:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
69878 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:69879:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
69879 | pub type value_type = *mut wxDateTimeHolidayAuthority;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70072:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
70072 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70073:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
70073 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70074:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
70074 | pub type value_type = *const wxEventTableEntry;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70114:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
70114 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70115:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
70115 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70116:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
70116 | pub type value_type = *mut wxEvtHandler;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70156:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
70156 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70157:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
70157 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70158:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
70158 | pub type value_type = *mut wxClassInfo;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70390:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
70390 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70391:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
70391 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70392:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
70392 | pub type value_type = *mut ::std::os::raw::c_char;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70490:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
70490 | pub type const_reference = const_reference;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `const_reference` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70491:1
      |
69364 | pub type const_reference = const_reference;
      | ------------------------------------------- previous definition of the type `const_reference` here
...
70491 | pub type const_reference = *const value_type;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const_reference` redefined here
      |
      = note: `const_reference` must be defined only once in the type namespace of this module

error[E0428]: the name `value_type` is defined multiple times
     --> wxRust_sys/src/bindings.rs:70492:1
      |
69366 | pub type value_type = *const ::std::os::raw::c_void;
      | ---------------------------------------------------- previous definition of the type `value_type` here
...
70492 | pub type value_type = *mut wxToolTip;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `value_type` redefined here
      |
      = note: `value_type` must be defined only once in the type namespace of this module

error[E0412]: cannot find type `T` in this scope
    --> wxRust_sys/src/bindings.rs:6860:53
     |
6860 | pub type wxBaseArray_CMPFUNC = wxArray_SortFunction<T>;
     |                             -                       ^ not found in this scope
     |                             |
     |                             help: you might be missing a type parameter: `<T>`

error[E0412]: cannot find type `T` in this scope
    --> wxRust_sys/src/bindings.rs:6881:28
     |
6880 | pub struct wxBaseObjectArray {
     |                             - help: you might be missing a type parameter: `<T>`
6881 |     pub _base: wxBaseArray<T>,
     |                            ^ not found in this scope

error[E0412]: cannot find type `T` in this scope
    --> wxRust_sys/src/bindings.rs:6883:47
     |
6883 | pub type wxBaseObjectArray_base = wxBaseArray<T>;
     |                                -              ^ not found in this scope
     |                                |
     |                                help: you might be missing a type parameter: `<T>`

Generated file: bindings.rs.zip

LoganDark avatar Jul 28 '20 04:07 LoganDark

You probably need to blacklist those. This is likely templates making bindgen sad.

emilio avatar Jul 28 '20 11:07 emilio

There are hundreds of these errors - it's not that easy to just blacklist them all and provide implementations for all of them. Keep in mind this is only a small portion of wxWidgets. Once you get into the territory of going through every class manually, you may as well write all the FFI bindings yourself too and that's just not going to happen with hundreds of thousands of lines of header files. (153,000 as counted by cloc)

LoganDark avatar Jul 28 '20 11:07 LoganDark

@LoganDark could you try to isolate at least one of them so we can try and fix it?

pvdrz avatar Sep 21 '22 20:09 pvdrz

@LoganDark could you try to isolate at least one of them so we can try and fix it?

After two years I no longer really have access to the original environment where this occurred. The GitHub repo that hosted the source code was deleted since a lot of the blocking issues were just sitting around. The general consensus seemed to be that bindgen is just not capable of consuming miles of C++ and that's outside of its scope.

FWIW I was trying to make bindings to wxWidgets (3.1.3, IIRC).

Willing to close as wontfix if you can't reproduce this.

LoganDark avatar Sep 21 '22 20:09 LoganDark

I'm almost sure that I've seen a similar error on the issue tracker. I'll try to take a look and find the issue and link it before deciding to close this. Thanks btw!

pvdrz avatar Sep 21 '22 21:09 pvdrz

@pvdrz I faced similar issue today while trying to make bindings for ginac.

In my setup, I had to compile 2 libraries: ginac and its dependency cln

The errors I faced are of 3 types.

  • E0391 : Ex. cycle detected when expanding type alias `size_type`
  • E0412: Ex. cannot find type `_Value` in this scope
  • E0428: Ex. the name `pointer` is defined multiple times

Let me know of what do you need from my setup to inspect it.

80avin avatar Dec 19 '22 09:12 80avin