Skip to content

pip install (of 0.4.1) fails in Windows under Python 3.5.1 using VS2015 compiler #46

Description

@PatternMatching

When attempting to install swigibpy using pip and Python 3.5.1 in Windows, I received the following error when attempting to compile swigibpy/IB/Shared/EClientSocketBase.cpp:

Macro definition of snprintf conflicts with Standard Library function declaration

A quick search on Google yielded a very helpful result. It appears that until now, many libraries (including IB API) used snprintf by defining it as _snprintf, since _snprintf was supported.

As of VS2015 (e.g. VC14), snprintf is officially supported, and it should therefore never be #define'd.

The offending line is in swigibpy/IB/Shared/StdAfx.h (8):

#define snprintf _snprintf

It would appear that IB fixed this in a release following the version included with swigibpy 0.4.1. I believe that this is also specific to the Python 3.x releases because Python 2.x builds point to earlier version of the VC++ compiler.

Not sure if this is super urgent given the pending push of version 0.5, but wanted to raise it in case it is a forcing function to move things along.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions