# Trying to use on Mac, getting errors when linking

**URL:** <https://discourse.glfw.org/t/trying-to-use-on-mac-getting-errors-when-linking/532>\
**Category:** support\
**Created:** [March 2, 2013, 1:35am UTC](https://discourse.glfw.org/t/trying-to-use-on-mac-getting-errors-when-linking/532 "2013-03-02T01:35:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [March 2, 2013, 1:35am UTC](https://discourse.glfw.org/t/trying-to-use-on-mac-getting-errors-when-linking/532/1 "2013-03-02T01:35:29Z")

</div>

**anonymous** wrote on [Saturday, March 02, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/14524972/#d686):

Hello, I am trying to compile the demo code here:  
[https://github.com/OpenGLInsights/OpenGLInsightsCode/issues/4#issuecomment-14309492](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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [March 19, 2013, 10:23pm UTC](https://discourse.glfw.org/t/trying-to-use-on-mac-getting-errors-when-linking/532/2 "2013-03-19T22:23:15Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Tuesday, March 19, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/14524972/#cbe8):

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