# Use GLFW with CLion and cygwin windows 10

**URL:** <https://discourse.glfw.org/t/use-glfw-with-clion-and-cygwin-windows-10/1237>\
**Category:** support\
**Created:** [December 21, 2018, 5:01pm UTC](https://discourse.glfw.org/t/use-glfw-with-clion-and-cygwin-windows-10/1237 "2018-12-21T17:01:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soreth](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Soreth](https://discourse.glfw.org/u/Soreth)\
**Post date:** [December 21, 2018, 5:01pm UTC](https://discourse.glfw.org/t/use-glfw-with-clion-and-cygwin-windows-10/1237/1 "2018-12-21T17:01:14Z")

</div>

Hello,  
I would use GLFW in my project but didn’t work.

As recommended, put thoses lines in CMake conf to compile glfw with the project

```
add_subdirectory(/cygdrive/c/Users/Soreth/CLionProjects/glfw-3.2.1/ glfw)
include_directories(/cygdrive/c/Users/Soreth/CLionProjects/glfw-3.2.1/include/)

target_link_libraries(myapp glfw ${GLFW_LIBRARIES})

```

but when I run my project I got the following error :

> CMake Error at /cygdrive/c/Users/Soreth/.CLion2018.3/system/cygwin\_cmake/share/cmake-3.13.0/Modules/FindX11.cmake:429 (message):  
> Could not find X11  
> Call Stack (most recent call first):  
> /cygdrive/c/Users/Soreth/CLionProjects/glfw-3.2.1/CMakeLists.txt:212 (find\_package)

That’s weird since x11 is linux and I try to compile it under windows.  
If someone know how to fix it I’ll be glad.

---

<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:** [December 22, 2018, 11:44am UTC](https://discourse.glfw.org/t/use-glfw-with-clion-and-cygwin-windows-10/1237/2 "2018-12-22T11:44:21Z")

</div>

If you want to compile GLFW for Windows the Microsoft Visual Studio C++ compiler is available free of charge (Community edition).

Cygwin provides a Linux like experience for development including an X Windows server. I can’t see the package xorg-dev needed for compiling GLFW on Linux distributions, but it’s possible that you might be able to build GLFW for Cygwin with other packages which are available.

Alternatively you can use Cygwin to build your application but use GLFW binaries build for Windows, I saw some notes on this here:  
[http://web.eecs.umich.edu/~sugih/courses/eecs487/glfw-howto/#cygwin](http://web.eecs.umich.edu/~sugih/courses/eecs487/glfw-howto/#cygwin)

Once again though I would reiterate that developing for Windows using Visual Studio is a much more standard procedure.
