You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 2 crate that depends on cxx, when I try to create a project that link to the 2 of them, I get linking error, as symbols for cxx object are defined more than once.
I'm unsure how to solve the problem in practice. I will investigate on my side, but has anyone sucessfully integrated 2 cxx crates using corrosion? Is there an example somewhere?
The text was updated successfully, but these errors were encountered:
I've been thinking (but haven't had the time to implement) about adding an abstraction to Corrosion that does the following:
Create a dummy wrapper package that has a staticlib library target, and depends on all the libraries you need. This should be automatically created by a CMake function corrosion_create_wrapper_staticlib(new_lib_name dep_1_crate ...).
The dependencies would need to have an rlib target, so that cargo can link them into the wrapper crate.
corrosion currently ignores rlib only libraries, so potentially one would need to add a staticlib to import the actual cxx libraries, even if they will not be used directly, just to make corrosion aware that these libararies exist.
Ok, have you ever integrated 2 libraries yet with a workaround?
I guess I will go with the one crate with everything in it as it seems to be the faster solution now.
I have 2 crate that depends on
cxx
, when I try to create a project that link to the 2 of them, I get linking error, as symbols for cxx object are defined more than once.I've stumble across that: dtolnay/cxx#883
I'm unsure how to solve the problem in practice. I will investigate on my side, but has anyone sucessfully integrated 2 cxx crates using corrosion? Is there an example somewhere?
The text was updated successfully, but these errors were encountered: