# Compiling GLFW under windows with MinGW

axyde wrote on Thursday, October 08, 2009:

Hi,

I want to compile GLFW (using MinGW under Windows). So i change to that
directory and execute:
`mingw32-make win32-mgw`

When I do that i get the error: `The command "." is either
misspelled or could not be found. mingw32-make: *** Error 1`

So I opened the makefile and figured out that i actually cllas the following
command:
`compile.bat mingw32-make mgw`

So i executet that command and all worked like described in . But when i
wanted to procced with "Step 3" i tried to execute
`mingw32-make cygwin-install`

i get the ouput . So did i do anything wrong or can anyone provide Win32/MinGW
binarys (.dll’s, .a’s and pkgconfig)? Sorry for my bad english …

Thanks, aXyde

elmindreda wrote on Thursday, October 08, 2009:

The MinGW make path in 2.6 is really broken and I’m not clever enough to make
a usable installation of MinGW on my machine, so I’m not sure when this will
change.

Hopefully, someone else on the forum knows more.

I do know, however, that the cygwin-install target assumes you’re using Cygwin
and thus have a Unix-like set of tools. Plain old MinGW, as I understand it,
does not.

axyde wrote on Friday, October 09, 2009:

After installing cygwin i was able to compile with “Makefile.win32.cywin
install”. So can anyone tell me how i can now link my code so it uses the
dynamic library? I tried “-lglfwdll” but then i get errors like
"undefined reference to `xyzMethod’". So whats the right liner
command for MinGW/cygwin/gcc?

axyde wrote on Friday, October 09, 2009:

Alright got i working now. For all people who search this: I just forgot to
add "#define GLFW_DLL" before the include of <GL/glfw.h>.