# GLFW 3 window creation fails in windows 10

**URL:** https://discourse.glfw.org/t/glfw-3-window-creation-fails-in-windows-10/814
**Category:** support
**Created:** [November 25, 2016, 6:17pm UTC](https://discourse.glfw.org/t/glfw-3-window-creation-fails-in-windows-10/814 "2016-11-25T18:17:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![PalmEvan](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/palmevan/32/74_2.png) [@PalmEvan](https://discourse.glfw.org/u/PalmEvan)
#### Post date: [November 25, 2016, 6:17pm UTC](https://discourse.glfw.org/t/glfw-3-window-creation-fails-in-windows-10/814/1 "2016-11-25T18:17:04Z")

</div>

```
#include <GLFW\glfw3.h>
#include <iostream>

int main(){

GLFWwindow *window = glfwCreateWindow(640, 480, "Title", NULL, NULL);

if (!glfwInit) {
	std::cout << "GLFW initialization failed.";
}
if (!window) {
	std::cout << "Failure to create window.\n";
}

std::system("PAUSE");
return 0;
}

```

Any ideas on how to fix this, glfwInit is true, but the window creation fails. I am using Visual Studio 2015 Community

---

<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 26, 2016, 2:31am UTC](https://discourse.glfw.org/t/glfw-3-window-creation-fails-in-windows-10/814/2 "2016-11-26T02:31:05Z")

</div>

You need to initialize glfw before creating window. Basically call to `glfwInit()` should be before call to `glfwCreateWindow`.

Also you are not calling glfwInit correctly - you need to have () parenthesis after function name. Just having `glfwInit` will make compiler to evaluate it as a function pointer.

---

<div class="post-metadata">

### Author: ![PalmEvan](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/palmevan/32/74_2.png) [@PalmEvan](https://discourse.glfw.org/u/PalmEvan)
#### Post date: [November 26, 2016, 5:49am UTC](https://discourse.glfw.org/t/glfw-3-window-creation-fails-in-windows-10/814/3 "2016-11-26T05:49:29Z")

</div>

thank you so much, it was very simple yet my brain just skipped over it.
