Generated Binding fails to compile due to due to redefinition as different kind of symbol
Error
#1350
Labels
redefinition as different kind of symbol
Error
#1350
I've Edited this description as more info on this bug has come to light
Description of the Bug
We've been using
autocxx
for a few months to generate Rust bindings to a Google graphics library, but bumping the graphics library to a new version is resulting in binding code that fails to compile.I believe the problem is that the updated API has some subtle C++ constructs that
autocxx
is choking on, and it's in a place where we can't to my knowledge disable code generation.Please see the
reproduce
section below to reproduce the issue, but I'll try to describe it at a high level here.using xxx = yyy
in another class. SeeVariant
in the following:autocxx
generated code breaks with an errorredefinition as different kind of symbol
.The actual build error seen as:
Which arises because the following code is generated in
gen0.cxx
:To handle this situation my first inclination is to disable the problematic new API method, and write some Rust/C++ to access the API indirectly (or something) , but this doesn't seem possible via the
autocxx
block!
macro.Reproducing the Bug
I've put together the following test case which reproduces the issue:
https://github.com/johnoneil/autocxx/tree/wb/johnoneil/namespace-issue
to reproduce:
You should see an error in the
build.log
Summary And Approaches to Fixing
autocxx
team could result in some suggestions to work around this issue. There seems to be more inautocxx
andcxx
that we're not using.block!
macro might be warranted so that individual methods on generated classes could be blocked. I've been trying this, but so far without success.cxx
(i.e. manually write it). I don't know if this is the best alternative.I've learned some about about using
autocxx
andcxx
while investigating this, but have a long way to go, so getting some advice from someone with more experience is vital.The text was updated successfully, but these errors were encountered: