[Python-ideas] Allow to compile debug extension against release Python in Windows

Ivan Pozdeev vano at mail.mipt.ru
Fri Dec 29 20:56:57 EST 2017


The Windows version of pyconfig.h has the following construct:

     if defined(_DEBUG)
            pragma comment(lib,"python37_d.lib")
     elif defined(Py_LIMITED_API)
            pragma comment(lib,"python3.lib")
     else
            pragma comment(lib,"python37.lib")
     endif /* _DEBUG */

which fails the compilation of a debug version of an extension. Making 
debugging it... difficult.

Perhaps we could define some other constant?

I'm not sure whether such compilation is a good idea in general, so 
asking here at first.

-- 
Regards,
Ivan



More information about the Python-ideas mailing list