Python loading library containing embedded python...
xorchid at gmail.com
Mon Jan 30 13:21:56 CET 2006
"Martin v. Löwis" <martin at v.loewis.de> wrote:
>> I have solved my problem, or at least part of it by downgrading
>> to Visual Studio 2003. For whatever reason, the same steps applied
>> to Visual Studio 2005 result in massive problems.
>> Even the python.exe compiled by VS 2005 throws A/Vs on startup.
>> Does Python have to use Visual Studio?
>Is this the debug build, by any chance? Microsoft broke support
>for ISO C in VS2005. The Python trunk has a work-around for that
Good to hear, for my sanity at least.
I was actually thinking Microsoft was losing or breaking C on
purpose after using VS2005, and even VS2003 to some degree.
I think it's some sort of tactic. That's another reason I don't
want to continue using VS for Python.
>> I have, of course, seen
>> the MinGW Python patches and tutorials, but I am told I should
>> not use anything but what Python was compiled with.
>More likely, you managed to mix msvcrt versions somehow. You
>need to inspect your resulting DLL in depends.exe; please report
>what it depends on.
I can't manage to compile anything with VS when Code Generation
is not set to the same type across projects. I guess I will try
the VS 2005 route again with this and the VS2005 patches in mind.
I am setting Code Generation the same across projects so I figured
that meant I was using the same C runtimes.
>Also notice that you cannot use extension DLLs in your embedded
>Python: all extension DLLs depend on python2x.dll, so importing
>one of them leads to multiple copies of the Python code in your
>> Are there plans to move away from VS?
>Well, VS is the the "platform compiler", so no. Of course, if
>you wanted that to happen, you could write a PEP, and explain
>what alternative compiler (plus alternative build procedure)
>should be used.
I imagine MinGW's build process would be much easier.
I *think* I have to keep two Python trees just to *easily*
compile static and dynamic import lib files from Python VS.
Otherwise, it is quite easy to overwrite a 3 meg static
pythoncore.lib with the 200k dynamic/import version.
More information about the Python-list