File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ extra-source-files:
46
46
flag UseNativeWindowsLibraries
47
47
description :
48
48
When compiling under Windows, use the native libraries instead of e.g. the
49
- ones coming with Cygwin.
49
+ ones coming with Cygwin or MSYS .
50
50
51
51
flag BuildExamples
52
52
description : Build various OpenGL/GLUT examples.
@@ -100,7 +100,6 @@ library
100
100
else
101
101
cpp-options : "-DCALLCONV=ccall"
102
102
cc-options : "-DUSE_GETPROCADDRESS"
103
- extra-libraries : glut32
104
103
else
105
104
cpp-options : "-DCALLCONV=ccall"
106
105
cc-options : "-DUSE_DLSYM"
Original file line number Diff line number Diff line change @@ -86,6 +86,16 @@ hs_GLUT_getProcAddress(const char *name)
86
86
if (firstTime ) {
87
87
firstTime = 0 ;
88
88
handle = LoadLibrary (TEXT ("glut32" ));
89
+
90
+ // If glut32 isn't present, try freeglut instead
91
+ if (!handle ) {
92
+ handle = LoadLibrary (TEXT ("freeglut" ));
93
+ }
94
+
95
+ // The MinGW-w64 version of freeglut prefixes "lib" onto the DLL name
96
+ if (!handle ) {
97
+ handle = LoadLibrary (TEXT ("libfreeglut" ));
98
+ }
89
99
}
90
100
91
101
return handle ? GetProcAddress (handle , name ) : NULL ;
You can’t perform that action at this time.
0 commit comments