>> Just for the heck of it, I changed
>> Python27/lib/distutils/cygwincompiler.py to return "msvcrt" instead of
>> "msvcr90". It works.
>>
>> My question is: do we really need to link our modules to msvcr*, if
>> python.dll (which we link already when building modules) links to msvcrt
>> itself? I assume there is a reason for that, but it is not clear to me.
>> Maybe I am misunderstanding the difference in linking on Windows? Under
>> Linux, linking is transitive, therefore if B (python) links to A
>> (msvcrt), then C (my module) linking to B links to A automatically.
> See the following documents:
> http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx
> http://msdn.microsoft.com/en-us/library/ms235460.aspx
Thanks for the references.

I double-checked python.exe/python27.dll, they link to 
c:\windows\winsxs\amd64_microsoft.vc90.crt_1fc8b3c9a1e18e3b_9.0.30729.4940_none_08e4299fa83d7e3c\msvcr90.dll.
 
Since this directory is not in $PATH, it does not get picked up when the 
.pyd gets loaded (I had to copy msvcr90.dll to the directory, and there 
were two copies afterwards, which explains the crash).

I also tried to remove -lmsvcr* from the link command, and modules get 
compiled just fine. I know I am just trying random things, perhaps 
without proper understanding, but... why bother linking to msvcr* at 
all? Am I just lucky in this case?

Cheers, Vaclav



------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to