# Window does not get created and terminates

**URL:** <https://discourse.glfw.org/t/window-does-not-get-created-and-terminates/1935>\
**Category:** support\
**Created:** [November 9, 2021, 2:53am UTC](https://discourse.glfw.org/t/window-does-not-get-created-and-terminates/1935 "2021-11-09T02:53:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chargingRhino](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@chargingRhino](https://discourse.glfw.org/u/chargingRhino)\
**Post date:** [November 9, 2021, 2:53am UTC](https://discourse.glfw.org/t/window-does-not-get-created-and-terminates/1935/1 "2021-11-09T02:53:53Z")

</div>

my program compiles but always exits when checking if the window creation was successful this is for both debug and release builds.

I’m using visual studio 2022 and windows 11. generated GLFW with cmake and had to get the GLFW header files from the precompiled binaries. I have tried using the precompiled binaries and had the same issue. the linker input, include and library directories are correct.

 ![glfwWindow](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/3e4e330eb3809df12749eeba520a09fa80def6fe.png)

---

<div class="post-metadata">

**Author:** ![chargingRhino](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@chargingRhino](https://discourse.glfw.org/u/chargingRhino)\
**Post date:** [November 9, 2021, 3:29am UTC](https://discourse.glfw.org/t/window-does-not-get-created-and-terminates/1935/2 "2021-11-09T03:29:25Z")

</div>

okay problem solved I’ve had to have my amd driver disabled for a few months ( computer crashes every 10 minutes ) so have been using the Microsoft generic, enabling the amd driver fixed the issue. so unfortunately cant use GLFW.

---

<div class="post-metadata">

**Author:** ![mmozeiko](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/mmozeiko/32/29_2.png) [@mmozeiko](https://discourse.glfw.org/u/mmozeiko)\
**Post date:** [November 9, 2021, 4:19am UTC](https://discourse.glfw.org/t/window-does-not-get-created-and-terminates/1935/3 "2021-11-09T04:19:08Z")

</div>

You could try using [mesa llvmpipe](https://docs.mesa3d.org/drivers/llvmpipe.html) software renderer. It obviously won’t be as fast as GPU hardware, but it will be way more functional than default Microsoft generic GL driver.

You can build it yourself, or you can download precompiled binary, for example, from here: [Mesa3D For Windows - Federico Dossena](https://fdossena.com/?p=mesa/index.frag)  
Place `opengl32.dll` from archive next to your .exe file and it should use software renderer.

The version in that link is quite old. If you want to build latest binary, see my build batch file here: [builds statically linked mesa opengl32.dll with llvmpipe using Visual Studio (make sure to download mesa.patch file too!!!) · GitHub](https://gist.github.com/mmozeiko/82ab8ddf349b70beee18a21f2ef0577c)  
It will build latest mesa code (currently at 21.3.0-rc1 version) that allows to use OpenGL version 4.5 for compatibility and core profiles.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [November 9, 2021, 10:47am UTC](https://discourse.glfw.org/t/window-does-not-get-created-and-terminates/1935/4 "2021-11-09T10:47:00Z")

</div>

I would also note that if your computer is crashing every 10 minutes with the AMD driver then it might be worthwhile investigating that and fixing it as this is highly unusual.

I have had a lot of success in using [Warnardsoft’s Display Driver Uninstaller](https://www.wagnardsoft.com/) from uninstalling driver installs which failed (as a gamedev we sometimes have to switch GPUs a lot). Make sure to [read the tutorial](https://www.wagnardsoft.com/content/ddu-guide-tutorial).

If uninstalling and installing a recent fails to resolve the problem it could be that some other software is causing the issue - I’ve seen everything from supposedly benign utilities to viruses and Bitcoin miners installing hooks into GPU drivers causing weird issues. There are a variety of free tools to help clean your system but a fresh install might be the best approach if you’re seeing this level of issues though you might first want to check your hardware isn’t the issue (though this can also take a lot of time).

Finally you could have a hardware issue - random frequent crashes are sometimes due to PSU power being too low, RAM problems etc.

---

<div class="post-metadata">

**Author:** ![chargingRhino](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@chargingRhino](https://discourse.glfw.org/u/chargingRhino)\
**Post date:** [November 9, 2021, 7:32pm UTC](https://discourse.glfw.org/t/window-does-not-get-created-and-terminates/1935/5 "2021-11-09T19:32:10Z")

</div>

thanks mesa llvmpipe worked.
