You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Alex Merry (JIRA)" <ji...@apache.org> on 2014/11/06 14:02:33 UTC

[jira] [Updated] (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:all-tabpanel ]

Alex Merry updated THRIFT-2798:
-------------------------------
    Description: 
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.

  was:
To compile with Visual Studio 2013 after defining TARGET_WIN_XP=0 (and HAVE_STDINT_H=1), I have to do the following:

1. Remove BoostThreadFactory.cpp and BoostThreadFactory.h from concurrency

2. Add
    #ifndef WINVER
    #  define WINVER 0x0601
    #endif
after
    #ifndef _WIN32_WINNT
    #  define _WIN32_WINNT 0x0601
    #endif
in windows/config.h

3. 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.


> 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
>            Reporter: Alex Merry
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)