• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Cross-Platform OpenGL Windowing Library


Commit MetaInfo

Revisionf39ef07c90081bd82af6c48cbcfbd5c1805b5876 (tree)
Zeit2022-02-17 16:37:00
AutorAlaskanEmily <emily@alas...>
CommiterAlaskanEmily

Log Message

Fix MinGW64 build

Ändern Zusammenfassung

Diff

--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,14 +1,14 @@
11 # Any copyright is dedicated to the Public Domain.
22 # http://creativecommons.org/publicdomain/zero/1.0/
33
4-UNAME=$(shell uname)
5-HAIKU=Haiku
4+UNAME := $(shell uname)
5+HAIKU := Haiku
66
77 ifeq "$(UNAME)" "Haiku"
88
99 all: libglow.so libglow.a
1010
11-CXXFLAGS=-fno-rtti -fno-exceptions -g -std=c++98 -Wall
11+CXXFLAGS := -fno-rtti -fno-exceptions -g -std=c++98 -Wall
1212
1313 glow_haiku.os: glow_haiku.cpp glow.h
1414 g++ $(CXXFLAGS) -fPIC -c glow_haiku.cpp -o glow_haiku.os
@@ -25,8 +25,17 @@ libglow.so: glow_haiku.os
2525
2626 else
2727
28+ifneq (,$(findstring CYGWIN,$(UNAME)))
29+
30+GLOWTARGET := win32
31+all: libglow.a
32+
33+else
34+
2835 all: libglow.so libglow.a
2936
37+endif
38+
3039 include gcc.mk
3140
3241 endif
--- a/glow_win32.c
+++ b/glow_win32.c
@@ -37,11 +37,6 @@ struct Glow_Window {
3737 /******************************************************************************/
3838
3939 #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;
4540
4641 #ifdef WinMain
4742 #undef WinMain
@@ -195,7 +190,7 @@ static LRESULT WINAPI glow_window_proc(HWND wnd,
195190
196191 /* This will get set to -1 if adaptive vsync works. */
197192 int interval = 1;
198- const char *const ext = glGetString(GL_EXTENSIONS);
193+ const char *const ext = (void*)glGetString(GL_EXTENSIONS);
199194
200195 SetPixelFormat(window->dc, pix_format, &glow_pixel_format);
201196 window->ctx.ctx = wglCreateContext(window->dc);