Skip to content

Commit 4b89621

Browse files
committed
Fix windows build
1 parent 608dbf0 commit 4b89621

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/native/corehost/json_parser.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,22 @@
88
// https://github.com/Tencent/rapidjson/issues/1596#issuecomment-548774663
99
#define RAPIDJSON_48BITPOINTER_OPTIMIZATION 0
1010

11+
// see https://github.com/Tencent/rapidjson/issues/1448
12+
// including windows.h on purpose to provoke a compile time problem as GetObject is a
13+
// macro that gets defined when windows.h is included
14+
#ifdef _WIN32
15+
#define NOMINMAX
16+
#include <windows.h>
17+
#endif
18+
1119
#include "pal.h"
1220
#include <external/rapidjson/document.h>
1321
#include <external/rapidjson/fwd.h>
1422
#include <vector>
1523
#include "bundle/info.h"
1624

25+
#undef GetObject
26+
1727
class json_parser_t {
1828
public:
1929
#ifdef _WIN32

0 commit comments

Comments
 (0)