Cross-Platform OpenGL Windowing Library
修订版 | f39ef07c90081bd82af6c48cbcfbd5c1805b5876 (tree) |
---|---|
时间 | 2022-02-17 16:37:00 |
作者 | AlaskanEmily <emily@alas...> |
Commiter | AlaskanEmily |
Fix MinGW64 build
@@ -1,14 +1,14 @@ | ||
1 | 1 | # Any copyright is dedicated to the Public Domain. |
2 | 2 | # http://creativecommons.org/publicdomain/zero/1.0/ |
3 | 3 | |
4 | -UNAME=$(shell uname) | |
5 | -HAIKU=Haiku | |
4 | +UNAME := $(shell uname) | |
5 | +HAIKU := Haiku | |
6 | 6 | |
7 | 7 | ifeq "$(UNAME)" "Haiku" |
8 | 8 | |
9 | 9 | all: libglow.so libglow.a |
10 | 10 | |
11 | -CXXFLAGS=-fno-rtti -fno-exceptions -g -std=c++98 -Wall | |
11 | +CXXFLAGS := -fno-rtti -fno-exceptions -g -std=c++98 -Wall | |
12 | 12 | |
13 | 13 | glow_haiku.os: glow_haiku.cpp glow.h |
14 | 14 | g++ $(CXXFLAGS) -fPIC -c glow_haiku.cpp -o glow_haiku.os |
@@ -25,8 +25,17 @@ libglow.so: glow_haiku.os | ||
25 | 25 | |
26 | 26 | else |
27 | 27 | |
28 | +ifneq (,$(findstring CYGWIN,$(UNAME))) | |
29 | + | |
30 | +GLOWTARGET := win32 | |
31 | +all: libglow.a | |
32 | + | |
33 | +else | |
34 | + | |
28 | 35 | all: libglow.so libglow.a |
29 | 36 | |
37 | +endif | |
38 | + | |
30 | 39 | include gcc.mk |
31 | 40 | |
32 | 41 | endif |
@@ -37,11 +37,6 @@ struct Glow_Window { | ||
37 | 37 | /******************************************************************************/ |
38 | 38 | |
39 | 39 | #ifdef __GNUC__ |
40 | -HINSTANCE __mingw_winmain_hInstance; | |
41 | -LPWSTR __mingw_winmain_lpCmdLine; | |
42 | -DWORD __mingw_winmain_nShowCmd; | |
43 | -extern char **__argv; | |
44 | -extern int __argc; | |
45 | 40 | |
46 | 41 | #ifdef WinMain |
47 | 42 | #undef WinMain |
@@ -195,7 +190,7 @@ static LRESULT WINAPI glow_window_proc(HWND wnd, | ||
195 | 190 | |
196 | 191 | /* This will get set to -1 if adaptive vsync works. */ |
197 | 192 | int interval = 1; |
198 | - const char *const ext = glGetString(GL_EXTENSIONS); | |
193 | + const char *const ext = (void*)glGetString(GL_EXTENSIONS); | |
199 | 194 | |
200 | 195 | SetPixelFormat(window->dc, pix_format, &glow_pixel_format); |
201 | 196 | window->ctx.ctx = wglCreateContext(window->dc); |