#1101 Use of Director causes duplicate references

closed-wont-fix
nobody
5
2010-09-27
2010-07-19
Bob Blaine
No

We are using SWIG 2.0.0 to create API's for both Python and C#. We use the same C++ dll for both, to reduce the number of dll's that we have to test/distribute. Everything works fine until you introduce the %feature(director) MyClass option to the .i files. In this case, when linking the dll's you get a duplication reference definition for the director methods one for each language, as the generated names of the directory don't have the target language names as part of them.
Current work around's are to build 2 dll's or to duplicate (with a different name) classes that require callbacks.

Discussion

  • Bob Blaine

    Bob Blaine - 2010-07-19
    • summary: Use of Directoy causes duplicate references --> Use of Director causes duplicate references
     
  • Olly Betts

    Olly Betts - 2010-09-27

    Sorry, I don't think we aim to support this approach, so closing as "won't fix".

    If you want to reduce code duplication, you can use one C++ DLL for the library you are wrapping, then separate DLLs for the SWIG glue code for each language. That has the advantage of avoiding loading all the C# glue when calling from Python.

     
  • Olly Betts

    Olly Betts - 2010-09-27
    • status: open --> closed-wont-fix
     

Log in to post a comment.