How to call Java from C++ using SWIG?

后端 未结 2 817
离开以前
离开以前 2021-01-12 10:02

I am able to call C++ code from Java using SWIG but I can\'t find any documentation on how to do the reverse (call Java from C++).

The official SWIG documentation s

2条回答
  •  春和景丽
    2021-01-12 10:29

    Based on the rather strange wording of the statement I'd say what you want isn't generally possible. "...call up from C++ to Java when wrapping C++ virtual methods." The "...call up..." leads me to believe you're calling protected or public members of an inherited interface and, "...when wrapping C++ virtual methods," leads me to conclude you can only do so when you're overriding an inherited interface. So it sounds like the actual use case is very narrow.

    But then, I'm just basing this on the wording of the text you've pasted. It may or may not help you.

提交回复
热议问题