擅长:python、mysql、java
<p>这很烦人。但我成功了。基本上,pyodbc源代码缺少很多垃圾。在</p>
<p>1)在pyodbc目录中,打开设置.py然后搜索“wd4668”。在</p>
<p>将该列表更改为如下所示:</p>
<pre><code>settings['extra_compile_args'] = []
</code></pre>
<p>2)在src目录中,创建一个名为“abc_minmax.h”的文件。在里面,写上:</p>
^{pr2}$
<p>3)在src目录中的以下文件中:</p>
<pre><code>cursor.h
params.h
sqlwchar.h
</code></pre>
<p>在顶部另一个include旁边添加以下行:</p>
<pre><code>#include "abc_minmax.h"
</code></pre>
<p>4)最后,在文件wrapper.h中,在另一个include旁边添加以下两行:</p>
<pre><code>#include <Windows.h>
#include <Winreg.h>
</code></pre>
<p>好吧,那就行了!如果有什么不管用的话告诉我。在</p>