Closed seftontycho closed 6 days ago
This is not an issue on linux but I assume that is because on windows to link to the dll you also need the .lib file whereas on linux that is not the case.
This is not a cbindgen issue, cbindgen only generates the headers... However it seems like you're trying to statically link multiple crates which is not really something that works, see https://github.com/rust-lang/rust/issues/33221 and so on.
A way to make it work could be something like this which compiles everything into a single staticlib.
I have two crates that use cbindgen to generate bindings for c++. When I try to build the C++ project with both crates on windows I get the following errors:
It looks like some parts of alloc and std are present in both (which makes sense) causing a conflict. How can I get around this?
My cbindgen.toml looks like the following: