gpt4 book ai didi

c++ - 在 C++ 中使用 Python 3.3 'python33_d.lib' 未找到

转载 作者:IT老高 更新时间:2023-10-28 22:22:55 25 4
gpt4 key购买 nike

我正在尝试 #include <Python.h>在我的 C++ 代码中,当我去编译我的代码时,我得到了这个错误:

fatal error LNK1104: cannot open file 'python33_d.lib'

我试图找到 python33_d.lib在我的计算机上包含在我的链接器依赖项中,但我找不到它。我已经能够找到python33.lib .

在哪里可以找到 python33_d.lib ,或者我该如何解决这个问题?

最佳答案

python bug tracker 中的简单解决方案:

#ifdef _DEBUG
#undef _DEBUG
#include <python.h>
#define _DEBUG
#else
#include <python.h>
#endif

关于c++ - 在 C++ 中使用 Python 3.3 'python33_d.lib' 未找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17028576/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com