Closed BCSharp closed 11 years ago
Thanks @Koneski. I'm not that familiar with building on Windows, I work on Linux and OSX myself but others reported what worked so I included it in the README.
I'll have a think about maybe adding a patching step to the swigibpy build process, I'm kinda hesitant though as it's a bit of a slippery slope and I want to avoid altering the TWS code if at all possible.
I understand your hesitation. Besides, the patch has to be modified each API release to be applied without fuzz as the code lines move with each release. I posted the patch here just in case somebody wants to compile/install swigibpy on Windows using MSVC.
I am moving my swigibpy-related development from Windows to OS X (development) and Linux (production) environment. I still compile IB-API on Windows (with the patch) for my .NET-based application.
I was forced to include a couple of TWS patches recently (to fix compilation under gcc 4.7 and to support shared pointers #7) so I've decided to include this as well.
I think the stance on patches will be that they will be considered for inclusion if:
Thanks again for the patch @Koneski!
This is actually a bug in the Interactive Brokers code. They have mixed up
_MFC_VER
with_MSC_VER
. The default distutils setup uses the VS compiler and this does not compile the IB code (issue mentioned in README.1st) since the IB code insists on linking with MFC. I don't think that linking a Python package with MFC is a good idea.The fix is actually easy (see patch below) but I don't know whether you want to apply it since it modifies 3rd party code. Recently, I have submitted the patch directly to IB, let's see whether they accept it.
For myself, I am keeping it in a Mercurial queue and applying it on every new API release. The problem dates from many API releases ago.
swigibpy: 0.3 python: 3.3.0 C/C++ compiler: VS 10.0 (aka Visual Studio 2010, aka _MSC_VER 1600) TWS: 931.3 OS: Windows 7 64-bit