Is there any way to include multiple header files with complex dependency structure in SWIG? I plan to use Microsoft SEAL( a C++ library) in Java with SWIG. However, I don't know how to deal with the complex dependency relationship in the header files with SWIG. For example, in "seal/seal.h", it includes other header files from the same directory. There is error finding the dependency of seal.h when I just include seal.h in the swig .i file. Or is there any other solution to use this complex C++ library in Java? Thanks a lot.
Asked
Active
Viewed 450 times
1
-
Does this answer your question? [SWIG errors because of preprocessor directive](https://stackoverflow.com/questions/10760287/swig-errors-because-of-preprocessor-directive) – Mark Tolonen Sep 02 '21 at 15:57
-
See this [duplicate](https://stackoverflow.com/a/10762949/235698). Directly `%include` any header you want to process as an interface, as SWIG doesn't recurse. There is a `-includeall` option, but that will often generate much more interface code than you intend to expose. – Mark Tolonen Sep 02 '21 at 15:58