使用 mysql 在 Windows 上快速修复 - 编译错误 python 2.7 [英] quickfix on windows with mysql - compile error python 2.7

查看:24
本文介绍了使用 mysql 在 Windows 上快速修复 - 编译错误 python 2.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试使用 setuptools 使用 mysql 后端在 windows 上为 python 编译 quickfix 时遇到此错误:

I get this error while trying to compile quickfix on windows for python with a mysql back-end using setuptools:

MySQLStore.obj : error LNK2019: unresolved external symbol _strptime referenced in function "private: void __thiscall FIX::MySQLStore::populateCache(void)" (?populateCache@MySQLStore@FIX@@AAEXXZ)
build\lib.win32-2.7\_quickfix.pyd : fatal error LNK1120: 1 unresolved externals
error: command 'C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\link.exe' failed with exit status 1120

我没有安装 Visual Studio(或没有任何使用经验),有没有办法在没有它的情况下解决这个问题?

I don't have visual studio installed (or have any experience with it), is there a way I can fix this without it?

谢谢,

查理

推荐答案

问题是我没有包含 strptime.c 文件(重命名为 strptime.cpp)并且还修改了此文件以包含 strptime.h 标头

The issue was that I hadn't included the strptime.c file (renamed to strptime.cpp) and also amended this file to include the strptime.h header

这篇关于使用 mysql 在 Windows 上快速修复 - 编译错误 python 2.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆