Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting typedef of ssize_t on Windows 32 bit when using Boost.Python #204

Closed
phogy opened this issue Feb 10, 2016 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@phogy
Copy link

phogy commented Feb 10, 2016

I'm currently evaluating your JSON library for use in a project that also uses Boost.Python to expose an API to the app as a Python class. I'm compiling with Python 2.7.11 and Boost.Python in turn includes its pyconfig.h, which typedefs ssize_t as an int.
I'm not entirely sure whether Python or your hpp is correct here but your inclusion of basetsd.h and consequtive using definition of ssize_t to its SSIZE_T, attempts to redefine it as a long. This is during Windows 32 bit compilation on Visual Studio 2015.

json\src\json.hpp(53): error C2371: 'ssize_t': redefinition; different basic types

Thanks in advance for any help or comments about this!

@nlohmann
Copy link
Owner

Hi @phogy, thanks for reporting the issue! In fact, we did not use ssize_t at all and I could remove it from the code. It would be great if you could check if the warning disappeared now.

@phogy
Copy link
Author

phogy commented Feb 11, 2016

Thanks for your swift action on this! Impressive.
I recompiled for Win 32-bit without any problems now. Still one wonders why pyconfig.h sets it to int...
Thanks again!

@nlohmann
Copy link
Owner

Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants