# Using GLFW from within another DLL

**URL:** <https://discourse.glfw.org/t/using-glfw-from-within-another-dll/229>\
**Category:** support\
**Created:** [May 27, 2012, 12:16pm UTC](https://discourse.glfw.org/t/using-glfw-from-within-another-dll/229 "2012-05-27T12:16:05Z")\
**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:** [May 27, 2012, 12:16pm UTC](https://discourse.glfw.org/t/using-glfw-from-within-another-dll/229/1 "2012-05-27T12:16:05Z")

</div>

**[ljdavison](https://sourceforge.net/u/ljdavison/)** wrote on [Sunday, May 27, 2012](https://sourceforge.net/p/glfw/discussion/247562/thread/3abbadc7/#2965):

HI All,

I am attempting to make a dll for my own use that uses GLFW. I can  
successfully open a window, but it is always blank… I am currently just trying  
to clear the screen to red to check that it works.

The same code works if I just put it in a normal project. So I am guessing  
that it has something to do with the fact that I am attempting to use GLFW  
from within another dll - and there is some gotcha that I am not aware of.

Any help with diagnosing this, or pointing me at the correct methods for doing  
this sort of thing would be greatly appreciated.

Many thanks,

Leo

---

<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:** [May 27, 2012, 2:40pm UTC](https://discourse.glfw.org/t/using-glfw-from-within-another-dll/229/2 "2012-05-27T14:40:08Z")

</div>

**[ljdavison](https://sourceforge.net/u/ljdavison/)** wrote on [Sunday, May 27, 2012](https://sourceforge.net/p/glfw/discussion/247562/thread/3abbadc7/#c7fd):

Hi All,

Not to worry… just realised I was making a rookie mistake!
