You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King III (JIRA)" <ji...@apache.org> on 2019/01/07 14:07:00 UTC
[jira] [Commented] (THRIFT-2798) Thrift does not compile on Windows
with TARGET_WIN_XP=0
[ https://issues.apache.org/jira/browse/THRIFT-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16735857#comment-16735857 ]
James E. King III commented on THRIFT-2798:
-------------------------------------------
We should probably drop Windows XP support and use _WINNT_WIN32=0x0601 (Windows 7 or later):
https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=vs-2017
Given the number of breaking changes in THRIFT-4720 it might be a good time to do this.
> Thrift does not compile on Windows with TARGET_WIN_XP=0
> -------------------------------------------------------
>
> Key: THRIFT-2798
> URL: https://issues.apache.org/jira/browse/THRIFT-2798
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.9.1, 0.9.2
> Reporter: Alex Merry
> Priority: Major
>
> To compile with Visual Studio 2013 after defining TARGET_WIN_XP=0 (and HAVE_STDINT_H=1), I have to do the following:
> # Remove BoostThreadFactory.cpp and BoostThreadFactory.h from concurrency
> # Add
> \#ifndef WINVER
> \# define WINVER 0x0601
> \#endif
> after
> \#ifndef _WIN32_WINNT
> \# define _WIN32_WINNT 0x0601
> \#endif
> in windows/config.h
> # Remove #include <thrift/transport/PlatformSocket.h> from Thrift.h (or move it to after #include <thrift/thrift-config.h>), since it depends on the WINVER definition from windows/config.h.
> I'm not sure what the best fix for the boost thread factory thing is (maybe #ifdef the file contents based on USE_BOOST_THREAD?), but I think the other code changes should go in.
> It may also be worth having
> \#if _MSC_VER >= 1800
> \# define HAVE_STDINT_H
> \#endif
> in windows/config.h.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)