Obviously there's no perfect way to do this, since at the very least, there's no perfect way to make a C interface to C++ generics. But are there any utilities that take a stab at this sort of thing? (e.g. by being given a list of template instantiations).
Asked
Active
Viewed 497 times
4
-
Have you looked at [Swig](http://swig.org/)? – Potatoswatter May 08 '15 at 03:27
-
1This has been asked before (unfortunately with no really good solution): http://stackoverflow.com/questions/2045774/developing-c-wrapper-api-for-object-oriented-c-code https://stackoverflow.com/questions/1588788/wrapping-c-class-api-for-c-consumption – Laserallan May 08 '15 at 03:34
-
2^ My impression from those and other threads has been that SWIG isn't much help for this use case. I'm checking out the GSOC fork mentioned in http://stackoverflow.com/questions/8303801/how-can-i-generate-c-wrappers-over-c-api-using-swig, but I'm also wondering if there are other more.. supported utilities that do this. – bfops May 08 '15 at 03:39
-
Follow-up to the above: The `make install` fails for the GSOC fork, and even the parts that install just seem to drop templates entirely, even in C++ mode. – bfops May 08 '15 at 03:51