diff --git a/examples/ThirdPartyLibs/glad/glad/gl.h b/examples/ThirdPartyLibs/glad/glad/gl.h index 3d08b2d45..0dfb4d9c8 100644 --- a/examples/ThirdPartyLibs/glad/glad/gl.h +++ b/examples/ThirdPartyLibs/glad/glad/gl.h @@ -2007,12 +2007,16 @@ typedef khronos_ssize_t GLsizeiptr; #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) typedef long GLintptrARB; #else +#ifndef __gltypes_h_ typedef ptrdiff_t GLintptrARB; #endif +#endif #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) typedef long GLsizeiptrARB; #else +#ifndef __gltypes_h_ typedef ptrdiff_t GLsizeiptrARB; +#endif #endif typedef int64_t GLint64EXT; typedef uint64_t GLuint64EXT; diff --git a/setup.py b/setup.py index 56cc7887f..82fd4059c 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ def parallelCCompile(self, newcc_args = cc_args if _platform == "darwin": if src.endswith('.cpp'): - newcc_args = cc_args + ["-stdlib=libc++"] + newcc_args = cc_args + ["-mmacosx-version-min=10.7", "-stdlib=libc++"] self._compile(obj, src, ext, newcc_args, extra_postargs, pp_opts) # convert to list, imap is evaluated on-demand @@ -417,7 +417,7 @@ elif _platform == "win32": +["examples/ThirdPartyLibs/glad/gl.c"] elif _platform == "darwin": print("darwin!") - os.environ['LDFLAGS'] = '-framework Cocoa -stdlib=libc++ -framework OpenGL' + os.environ['LDFLAGS'] = '-framework Cocoa -mmacosx-version-min=10.7 -stdlib=libc++ -framework OpenGL' CXX_FLAGS += '-DB3_NO_PYTHON_FRAMEWORK ' CXX_FLAGS += '-DHAS_SOCKLEN_T ' CXX_FLAGS += '-D_DARWIN '