How to Rename SWIG Generated Proxy Java classes created from C Structures
问题 I have a few C structures like below that are generated by SWIG into sample_struct_t.java since the C function declares it as sample_struct_t. What would I need to add to the SWIG interface file to generate the sample_struct_t structure as Sample.java? typedef struct sample_struct_t_ { char *sample; uint8_t example; ios_boolean remove; } sample_struct_t; 回答1: You need to use %rename with the non- typedef 'd (i.e. original) name, before this is first seen: %module test %rename (Sample) sample