Compiling python modules with DEBUG defined on MSVC

前端 未结 5 1592
我寻月下人不归
我寻月下人不归 2020-12-14 02:08

Python rather stupidly has a pragma directive in its include files that forces a link against python26_d.lib when the DEBUG preprocessor variable i

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 02:50

    After you comment out "#define Py_DEBUG" on line 332 and modify

    #   ifdef _DEBUG
    #    pragma comment(lib,"python26_d.lib")
    #   else
    

    to

    #   ifdef _DEBUG
    #    pragma comment(lib,"python26.lib")
    #   else
    

    you do not need to python26_d.lib anymore.

提交回复
热议问题