GLFW in Cygwin installation


Hi, I´m new with c++ and trying to install GLFW in Cygwin. But when compile it shows this error:
inicio.cpp:(.text+0xe): undefined reference to `glfwInit’

I searched for more than one day and I´m still lost.

*I Downloaded Windows 64 binaries.


Note that Visual Studio has a free community edition and using this would be my recommended approach for building applications on Windows.

For Cygwin, I can’t offer detailed help as I am insufficiently familiar with it. Perhaps have a look at this tutorial:


I really appreciate your help. The page really help me. I Just got one error now.

/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/…/…/…/…/x86_64-pc-cygwin/lib/…/lib/libglfw3.a(init.c.obj):init.c:(.text+0x50): undefined reference to `__ms_vsnprintf’

Still reading on internet about this problem. Hope can find out today.

Thanks a lot !


The latest cygwin X11 server automatically uses the native windows WGL drivers so you can now build on cygwin using the same cmake build process as for linux or macosx:

The standard build will make a static library but you can also build the shared library version but then you’ll need to be sure that the generated dll is in the path. Hope this helps.

Glfw with cygwin

have you find out the solution to your issue with ` undefined reference to __ms_vsnprintf ’?