Python rather stupidly has a pragma directive in its include files that forces a link against python26_d.lib
when the DEBUG
preprocessor variable is defined. This is a problem because the python installer doesn't come with python26_d.lib
! So I can't build applications in MSVC in debug mode. If I temporarily #undef DEBUG
for just one file I get many complaints about inconsistent DLL linkage. If I change the pragma in pythons include file I get undefined references to various debug functions.
I have tried compiling my own version of python but its somehow different enough from the python that gets distributed that I can't use my modules with apps built with the vanilla version of python
Can anyone give me any advice on how to get round this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…