Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Compiling Python with static runtime library (VS2010)

Thread Tools

Compiling Python with static runtime library (VS2010)

Jonatan Magnusson
Posts: n/a


I'm trying to build Python 3.3.0 on Windows using Visual Studio 2010 Express.

I opened the solution (pcbuild.sln) and built the "python" project (including its dependencies of course) and that worked fine with just a few warnings.

But I need to build Python using the the static C runtime so I followed the instructions:

* Changed "Runtime Library" to non-DLL variant (/MT or /MTd) for each of the projects (make_buildinfo, make_versioninfo, kill_python, python core, w9xpopen and python)
* Changed preprocessor macro Py_ENABLED_SHARED to Py_NO_ENABLE_SHARED in the pythoncore project
* Changed configuration type from Dynamic Library to Static library for the pythoncore project

Then I recompiled and once again it built with just a few warnings, until the link stage where "__imp__Py_Main" was unresolved!

Is it no longer supported to build against the static runtime libraries or am I doing something wrong?

Jonatan Magnusson

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
static library and dynamic library Even C Programming 6 10-20-2007 04:05 PM
Static library Vs. Dynamic library iceColdFire C++ 3 05-17-2005 06:16 AM
how to link static library to another static libraries C++ 2 05-16-2005 04:40 PM
Dynamic Library or Static Library under Linux C++ 6 05-10-2005 03:16 PM
compiling perl as a static library on win32, "use" command Torsten Mohr Perl Misc 5 02-25-2004 07:44 PM