Multiple Rust modules with "cargo test" (minimal example included) #1014
-
Hi there, I am starting to get the hang of using In my approach I compile the cxx-qt QObject types into a static library, then link that into a dynamic library with a registration function that registers them through It seems to work nicely. However, I also would like to make use of To illustrate I made this minimal example: https://github.com/SanderVocke/cxx-qt-multi-module-problem It is quite straightforward - basically it is the minimal-qml example, plus:
Would you have any idea how to modify or restructure this? Ideally I would still like it to be a single crate, because I expect to make many QObject derivatives and a crate per object would be overkill. Thanks in any case! P.S.: if with a small modification this structure can be made to work, I would suggest adding something like this into the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
It could be that both modules are outputting to the same header file? Could you try using See the book for more info https://kdab.github.io/cxx-qt/book/bridge/index.html#cxx_file_stem |
Beta Was this translation helpful? Give feedback.
It could be that both modules are outputting to the same header file?
Could you try using
cxx_file_stem
to specify different files in the bridge macro?See the book for more info https://kdab.github.io/cxx-qt/book/bridge/index.html#cxx_file_stem