# Building GLFW.. WITHOUT OpenGL!

**URL:** <https://discourse.glfw.org/t/building-glfw-without-opengl/292>\
**Category:** support\
**Created:** [February 1, 2011, 5:18am UTC](https://discourse.glfw.org/t/building-glfw-without-opengl/292 "2011-02-01T05:18:21Z")\
**Posts on this page:** 4\
**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:** [February 1, 2011, 5:18am UTC](https://discourse.glfw.org/t/building-glfw-without-opengl/292/1 "2011-02-01T05:18:21Z")

</div>

**[bencelot](https://sourceforge.net/u/bencelot/)** wrote on [Tuesday, February 01, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/e7e7c415/#8fee):

A crazy idea to be sure. GLFW would simply become… FW. But a framework is  
exactly what I need 😉

Basically, I’ve got my game running with GLFW (loving it btw). I’m using  
GLFW for a number of things including: window setup, keyboard input, timing,  
multithreading, etc…

Now here comes the problem. I want to create a linux dedicated server that’s  
capable of running on machines with no graphics support at all. This means  
they do NOT already have [libGL.so](http://libGL.so) or [libGLU.so](http://libGLU.so)! And even though I’ve disabled  
the window creation in such a version, GLFW still requires these opengl shared  
libraries to run. So I was wondering, is it possible to build GLFW without any  
graphical dependencies and only build stuff like multithreading and timing?  
This way I can release a dedicated version of my game without having to remove  
all of GLFW’s lovely non-graphical features.

Cheers,  
Ben.

---

<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:** [February 1, 2011, 9:50am UTC](https://discourse.glfw.org/t/building-glfw-without-opengl/292/2 "2011-02-01T09:50:13Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Tuesday, February 01, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/e7e7c415/#1a77):

Have you tried simply not linking against GL and GLU? Your linker may be  
clever enough to figure it out, since you’re most likely not calling anything  
in x11\_window.c.

If, however, you need to be rid of all X depdendencies, that will take some  
doing.

---

<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:** [February 1, 2011, 10:46am UTC](https://discourse.glfw.org/t/building-glfw-without-opengl/292/3 "2011-02-01T10:46:52Z")

</div>

**[bencelot](https://sourceforge.net/u/bencelot/)** wrote on [Tuesday, February 01, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/e7e7c415/#aa59):

Hmm, well at the moment that won’t even let me compile as I get a whole bunch  
of unresolved calls to gl commands. However, I haven’t gone to the trouble of  
#ifdeffing them out just yet, so perhaps after I do that it won’t be a  
problem anymore. I’ll keep you posted.

---

<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:** [February 3, 2011, 2:24am UTC](https://discourse.glfw.org/t/building-glfw-without-opengl/292/4 "2011-02-03T02:24:52Z")

</div>

**[bencelot](https://sourceforge.net/u/bencelot/)** wrote on [Thursday, February 03, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/e7e7c415/#65b2):

Yeah ok, that didn’t work. Even once I’d unlinked GL and GLU and then removed  
all opengl calls in MY code… glfw started complaining when I compiled. To be  
expected I spose. Anyway, it wasn’t that big an issue, I just replaced my  
remaining timing, sleeping and multithreading glfw calls, effectively removing  
glfw completely from my dedicated server. I could then unlink from libglfw.a  
and it all works fine now.

Still, gotta love GLFW for my client 😃
