Hello,
I’ve been trying to compile the project on macosx snow leopard and I get this
error:
macosx_window.c:374: error: ‘typeLongInteger’ undeclared (first use in this
function)
I don’t see typeLongInteger beign declare anywhere. Also, I get alot of
implicit declaration in this file.
macosx_window.c:248: warning: implicit declaration of function
‘ConvertEventRefToEventRecord’
macosx_window.c:249: warning: implicit declaration of function ‘FindWindow’
macosx_window.c:251: warning: implicit declaration of function ‘MenuSelect’
macosx_window.c:252: warning: implicit declaration of function ‘HiliteMenu’
macosx_window.c:341: warning: implicit declaration of function
‘GetWindowBounds’
The problem is that GLFW on the Mac is implemented on top of Carbon, Carbon is
not supported for 64-bit applications, and Snow Leopard’s toochain defaults to
64-bit.
As elmindreda says, the correct solution is to wait for the Cocoa port of GLFW
(though an estimated release date would be lovely to know).
However, that is obviously not feasible in the short term, and there is a
workaround. As long as your application does not require 64-bit (i.e. does
not need access to more than 4 GB of RAM), then you can compile both GLFW and
your application in 32-bit mode, and all will work fine.
If you are compiling on the command line, you need to pass GCC the '-m32’
option. If you are using XCode, you can set the target architecture to 'i386’
instead.