-
Hi, I've been experimenting with OCC headers to find all the potentials issues in creating the bindings with JavaCPP. OCC defines:
I can now get this C++ to work (ie Java/JNI wrapping generated and compiled and apparently also executing correctly):
this also works:
but this does not work:
This results in:
Now, this is not necessarily a problem as most of the OCC API seems to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This isn't working because of a typedef, it's because the template instance is missing. Those need to be given a name: infoMap.put(new Info("opencascade::handle<Base>").pointerTypes("Handle_Base"));
infoMap.put(new Info("opencascade::handle<SomeClass>").pointerTypes("Handle_SomeClass"));
... You can put this in methods and for loops like this to cut down on the copy/paste: |
Beta Was this translation helpful? Give feedback.
This isn't working because of a typedef, it's because the template instance is missing. Those need to be given a name:
https://github.com/bytedeco/javacpp/wiki/Mapping-Recipes#creating-instances-of-c-templates
In this case, something like this should work:
You can put this in methods and for loops like this to cut down on the copy/paste:
https://github.com/bytedeco/javacpp-presets/blob/master/pytorch/src/main/java/org/bytedeco/pytorch/presets/torch.java#L1232
https://github.com/bytedeco/javacpp-presets/blob/master/pyt…