[Python-Dev] Python + Visual C++ 8.0? (original) (raw)

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Tue Dec 27 22:59:49 CET 2005


--- Adal Chiriliuc <adal.chiriliuc at gmail.com> wrote:

Python uses LoadLibraryEx with the LOADWITHALTEREDSEARCHPATH flag which means that DLLs used by the extension will be searched IN THE EXTENSION FOLDER and not on PATH.

Try putting msvcp80.dll right next to your extension DLL.

I tried that first since that's the way we use VC 7.1 extensions with older Python versions (compiled with VC 6).

It is a little strange that it is not loaded directly from the Windows side by side folder (%WINDIR%\WinSxS). You should check if the manifest is embedded correctly inside the DLL.

Sorry, the manifests are new to me. How can I check if the manifest is correctly embedded? FWIW: I already tried copying the manifest into the directory with the extensions.

In case it matters, here are the compiler and liker switches I am using (commands issued by scons):

cl /nologo /D_CRT_SECURE_NO_DEPRECATE /wd4996 /Zm800 /MD /GR /EHsc /DBOOST_DISABLE_THREADS /DNDEBUG /Ox -DBOOST_PYTHON_MAX_BASES=2 -DBOOST_PYTHON_SOURCE

link /nologo /incremental:no /dll /out:lib\cctbx_math_ext.pyd /implib:lib\cctbx_math_ext.lib /LIBPATH:lib

Am I missing some magic new switch?

And like Martin said, mixing Python and extensions compiled with different compilers is a bad idea.

If that's really the case it will mean a lot of work. Mixing VC6 Python and VC7.x extensions never gave us any trouble.

Thanks!

Cheers, Ralf


Yahoo! for Good - Make a difference this year. http://brand.yahoo.com/cybergivingweek2005/



More information about the Python-Dev mailing list