Yeah, I'm never doing that again. I created a binding for the Irrlicht rendering engine with Lua using swig. There were always parsing errors with the header files so I had to create definition files for almost everything. It was a lot of work, but I did finally get it to function.
And then a new version of Irrlicht came out, and I basically had to start from scratch. All the definition files no longer matched the headers so they had to be recreated.
And then a new version of Lua came out and broke modules. The binding was written as a module so that had to be redone too.
I got way more familiar with the internals of swig than I ever wanted to. Each language it supports has it's own little parser/runtime integration, so I had to learn a lot about how swig and lua interact.
If I were to do it again I'd create a proper C binding to the C++ interface, and then bind that to whatever language I wanted. They almost all support C. C++ is a whole other beast.