Perhaps I should split this into separate questions, but having tried all of this, I wonder if they're not all interrelated.
Here's the backstory: There are some C libraries in both Linux and Windows. Someone used swig in Linux to expose the C libraries' API to Python. He more or less wrote a build script (.i file) for swig, and swig created a wrapper C file, and he used gcc to compile that C file, linking to the original libraries to get a Python module.
Now I've been handed his work and asked to do it for the Windows libraries. The hope was that I could find a quick way of using his .i files to create one for Windows. We use Visual Studio 2010.
I don't know swig much, and am not that knowledgeable in C or the Visual Studio environment, so I finally gave up experimenting and decided to ask here.
The questions:
The C libraries I have are static. Is that OK? Can I just use the wrapper file swig produces and link it to the static libraries to create a dynamic library (for use in Python)? If the answer is no, this actually could get complicated. Basically, I want to expose the API of one particular library (call it "A"). That library, in turn, relies on "L", "C" and "D". I have access to the source code for "A" and "L", so I can compile them any way I please, but "C" and "D" is out of my control - they are static libraries.
In Windows, for use with Python, what exactly is the output file I want? A DLL? Should it have a .pyd extension? I'm familiar with all this in Linux (used Cython in the past), but not in Windows.
I'd really like help on handling this in Visual Studio 2010. The docs cover Visual Studio 6 and a few versions above, but are relatively sparse in details. Instead they suggest I just use the .dsp/.dsw files that come with SWIG. I did try that using a simple example that comes with it. VS2010 converted the dsp/dsw file to VS2010 format, and it kind of all works - creating a .pyd file. However, when I go into the project/solution's properties, I see no settings for swig, or for creating something with a .pyd extension! The custom/post-build settings are empty! I suspect when VS2010 converted the project files to its format, it took care of all the post-build settings, but doesn't display them.
Many thanks!