Trying to use on Mac, getting errors when linking

anonymous wrote on Saturday, March 02, 2013:

Hello, I am trying to compile the demo code here:
https://github.com/OpenGLInsights/OpenGLInsightsCode/issues/4#issuecomment-14309492

It seemed to need a mac version of GLFW, so I downloaded and compile it. But when I link it to this project I get these errors:

“_IOCreatePlugInInterfaceForService”, referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
"_IOIteratorNext", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
"_IOMasterPort", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
"_IORegistryEntryCreateCFProperties", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
"_IOServiceGetMatchingServices", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
"_IOServiceMatching", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
ld: symbol(s) not found for architecture x86_64

How do I fix that?

Thanks!
Bob

elmindreda wrote on Tuesday, March 19, 2013:

You need to link against the IOKit framework, as is explained in section 4.2.5 of the readme file.