Linking to Python import library in Visual Studio 2005

前端 未结 2 1847
生来不讨喜
生来不讨喜 2021-01-12 05:32

I have a C++ application that has embedded Python. I\'m building with Visual Studio 2005. When I try to link to python26.lib, I get a number of unresolved symbols, all of wh

相关标签:
2条回答
  • 2021-01-12 06:15

    Looks like I was trying to link a 64-bit Python library to a 32-bit application. I wish the linker would tell me something other than "unresolved symbol." Linking to the 32-bit library fixes the problem.

    0 讨论(0)
  • 2021-01-12 06:34

    Try to include C:\WINDOWS\system32\python26.dll in your references. python26.lib contains the symbol names for the main DLL.

    0 讨论(0)
提交回复
热议问题