一、安装mingw64
下载链接:https://sourceforge.net/projects/mingw-w64/
相关教程:https://zhuanlan.zhihu.com/p/76613134
二、下载OpenKE
链接:https://github.com/thunlp/OpenKE/tree/master
三、修改base下文件
1、在base.cpp中的#include <pthread.h>
前添加一行 #define HAVE_STRUCT_TIMESPEC
2、将base下所有文件中的extern "C"
替换为extern "C" __declspec(dllexport)
3、将setting.h中的 #define INT long
修改为 typedef int INT;
四、编译
编译生成Base.dll文件
**注意事项:**①python和mingw都是64位;②typedef int INT;
这里有分号。