Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f5f8ce3

Browse files
committed
Move Python.h include into first position
1 parent bf2be71 commit f5f8ce3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

matplotlibcpp.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#pragma once
22

3+
// Python headers must be included before any system headers, since
4+
// they define _POSIX_C_SOURCE
5+
#include <Python.h>
6+
37
#include <vector>
48
#include <map>
59
#include <array>
@@ -10,8 +14,6 @@
1014
#include <cstdint> // <cstdint> requires c++11 support
1115
#include <functional>
1216

13-
#include <Python.h>
14-
1517
#ifndef WITHOUT_NUMPY
1618
# define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
1719
# include <numpy/arrayobject.h>

0 commit comments

Comments
 (0)