I am considering SWIG as a tool for wrapping certain functionalities of a large library into an SDK. I had some success in wrapping some classes from the C++ library into other languages (e.g. Python, C# and D) but I cannot figure out how to do the same with C++.
In other terms, I would like to let SWIG automatically generate a C++ proxy class (see here) for the C++ target, so that I can expose just a single DLL file and some simplified C++ files that use the DLL. Releasing the underlying C++ library is not feasible. Any ideas?
Edit: as suggested by Jens Munk, there is a Google Summe of Code (GSoC) 2008 branch of Swig that allows to set "c" as the target language. There is also another GSoC 2012 version that allows to set Objective-C target. However, all these versions were not merged into the official release, so one needs to build them from scratch and they contain many annoying issues. As far as I know, there is no good option yet to automatically generate proxy C++ classes via Swig.
Additional material:
- Mixing C++ code from different compilers
- About support for Objective C target
- Google Summer of Code 2008 branch for C++ target
- Google Summer of Code 2012 branch for Objective C target
- Similar or related question on SO
- Blog page of Google Summer of Code 2008
from-different-compilers