File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 112.7.0.9
22--------
3- * Windows/Linux: The GLUT package compiles without any additional GLUT library now.
3+ * The GLUT package compiles without any additional library/framework now.
44* Windows: We search for a native freeglut DLL, a MinGW freeglut DLL and a classic GLUT DLL, in that order.
55
662.7.0.8
Original file line number Diff line number Diff line change @@ -103,8 +103,6 @@ library
103103 else
104104 cpp-options : "-DCALLCONV=ccall"
105105 cc-options : "-DUSE_DLSYM"
106- if os(darwin)
107- frameworks : GLUT
108106
109107executable BOGLGP01-OnYourOwn1
110108 if !flag(BuildExamples)
Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ hs_GLUT_getProcAddress(const char *name)
4848#include <stdlib.h>
4949#include <dlfcn.h>
5050
51+ #ifdef __APPLE__
52+ #define FILENAME "/System/Library/Frameworks/GLUT.framework/GLUT"
53+ #else
54+ #define FILENAME "libglut.so"
55+ #endif
56+
5157void *
5258hs_GLUT_getProcAddress (const char * name )
5359{
@@ -56,7 +62,7 @@ hs_GLUT_getProcAddress(const char *name)
5662
5763 if (firstTime ) {
5864 firstTime = 0 ;
59- handle = dlopen ("libglut.so" , RTLD_LAZY );
65+ handle = dlopen (FILENAME , RTLD_LAZY | RTLD_GLOBAL );
6066 }
6167
6268 return handle ? dlsym (handle , name ) : NULL ;
You can’t perform that action at this time.
0 commit comments