Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8280595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:44:03+00:00 2026-06-08T09:44:03+00:00

Perhaps I should split this into separate questions, but having tried all of this,

  • 0

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:

  1. 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.

  2. 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.

  3. 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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:44:06+00:00Added an answer on June 8, 2026 at 9:44 am
    1. There shouldn’t be any problems with that. Just add “L”, “C” and “D” libraries in VS as you usually add external libraries.

    2. Yes. Target should be Dynamic Library (.dll) but output file should be renamed as _something.pyd (See link below how to configure the project)

    3. SWIG could be integrated in VS solution build toolchain. I wrote a manual of how to use SWIG and Visual studio some time ago and now updated it for you:

    How to use SWIG with Visual Studio 2010

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right, perhaps I should be using the normal Python lists for this, but here
Perhaps I'm misunderstanding how this should work, but I've created an object in the
I know this should be straightforward, but I am having problems splitting a data
I want to split a C file into tokens, not for compiling but for
Perhaps this is an effect of installing the new 4.5 beta, but my simulator
Perhaps I'm not using the right terminology, but I'm struggling to try to find
I have this SaveCheckedStateToDB() function: public class oDaA_DBUtils { // TOOD: Perhaps this should
Using cancelAllLocalNotifications should basically cancel the delivery of all scheduled local notifications . But
I think this is one of those vi vs. emacs type of questions, but
One thought is that perhaps I should create an array and just .each() all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.