My understanding is that SWIG produces c/cxx source code, it doesn't compile your code. And nothing prevents you from linking statically, if you have problems with shared libs. Vio