# Question about GLFW static library in Cocoa framework

**URL:** <https://discourse.glfw.org/t/question-about-glfw-static-library-in-cocoa-framework/543>\
**Category:** support\
**Created:** [April 11, 2013, 4:33am UTC](https://discourse.glfw.org/t/question-about-glfw-static-library-in-cocoa-framework/543 "2013-04-11T04:33:59Z")\
**Posts on this page:** 3\
**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:** [April 11, 2013, 4:33am UTC](https://discourse.glfw.org/t/question-about-glfw-static-library-in-cocoa-framework/543/1 "2013-04-11T04:33:59Z")

</div>

**[uratec](https://sourceforge.net/u/uratec/)** wrote on [Thursday, April 11, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/0ecaf379/#12bf):

I use GLFW-2.7.8 in X11, Windows, and Mac OS.  
Following code work fine in x11, win32, Carbon framework.  
(./plugin.so is loaded in ./main command)

% gcc -o ./main ./main.c GLFW.a  
% gcc -o ./plugin.so ./plugin.c GLFW.a -dynamiclink  
% ./main ./plugin.so

But, following messages were generated in only Cocoa framework.

[Class GLFWThread is implemented in both main and [plugin.so](http://plugin.so). One of the two will be used.]

Is it bug?

---

<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:** [April 11, 2013, 4:27pm UTC](https://discourse.glfw.org/t/question-about-glfw-static-library-in-cocoa-framework/543/2 "2013-04-11T16:27:22Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Thursday, April 11, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/0ecaf379/#456b):

Don’t put GLFW into both binaries.

---

<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:** [April 12, 2013, 1:13am UTC](https://discourse.glfw.org/t/question-about-glfw-static-library-in-cocoa-framework/543/3 "2013-04-12T01:13:23Z")

</div>

**[uratec](https://sourceforge.net/u/uratec/)** wrote on [Friday, April 12, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/0ecaf379/#3319):

Thank you for your answer.

I fixed this problem.  
Two files(cocoa\_init.m and cocoa\_window.m) were compiled for each binary by changing class name.
