When I try to compile msgpack under windows with visual studio 2008 professional version by doing
Python setup.py build
I get
msgpack/_packer.cpp(316) : fatal error C1083: Cannot open include file: 'stdint.
h': No such file or directory
Apparently this is due to MS compiler not having proper C support, so I've downloaded the latest msinttypes which is supposed to fix this problem. If I place the inttypes.h and stdint.h under C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
and try to compile again, I get:
c:\work\tools\msgpack-python-0.4.0\msgpack-python-0.4.0\msgpack\sysdep.h(24) : e
rror C2371: 'int8_t' : redefinition; different basic types
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\stdint.h(87) : see
declaration of 'int8_t'
Based on google searches, this looks like some other header file somewhere is defining int8_t. Actually, if I'm not mistaken the error says that it is stdint.h, which is the header file I've added from msinttypes to fix the problem in the first place. This machine also has vs.net 2010 professional installed, but I'm not sure if that could cause any problems.
Considering the fact that I have a full Python setup running under windows under this machine, I can't switch to mingw under Windows, because that'd probably cause issues since all the Python 2.7 code is compiled with visual c++ 2008.
How do I compile msgpack extension so that I use the fast version under windows?
Compiling Python libraries on Windows can indeed be a pain.
I usually use precompiled binaries provided by Christoph Gohlke whenever possible. He appears to have a build of msgpack.