【发布时间】:2011-11-30 01:50:48
【问题描述】:
我认为以下 SWIG 接口文件结构无效。 int func(usigned char key[20]) 位于 headerThree.h 中。当我离开 %include "HeaderThree.h" 时,我得到一个重复的 int func(SWIGTYPE_p_unsigned_char key);。如果我删除 %include "HeaderThree.h",其他函数不会显示在生成的 Example.java 文件中。只有 int func(short[] key) 会显示。我想将 SWIG .i 文件配置为没有 func(SWIGTYPE_p_unsigned_char key) 函数,但要将其余函数包含在 HeaderThree.h 中。有任何想法吗?
%module Example
%{
#include "HeaderOne.h" //has constants and type definitions
#include "HeaderTwo.h" // has an #include "HeaderOne.h" and its own C apis
#include "HeaderThree.h" // has an #include "HeaderOne.h" and its own C apis
%}
%include "arrays_java.i"
int func(unsigned char key[20]);
%include "HeaderOne.h" //has constants and type definitions
%include "HeaderTwo.h" // has an #include "HeaderOne.h" and its own C apis
%include "HeaderThree.h" // has an #include "HeaderOne.h" and its own C apis
【问题讨论】:
标签: swig