diff --git a/Makefile b/Makefile
index 571193f115a908269547ec43718e5eb9c3bdc180..5170ddcb58f22f0446b32302be64471cad56c19b 100644
--- a/Makefile
+++ b/Makefile
@@ -124,8 +124,8 @@ mingw:
 	windres build\res.rc build\res.o
 	$(CC) $(MINGWOPT) mongoose.c -lws2_32 \
 		-shared -Wl,--out-implib=$(PROG).lib -o $(PROG).dll
-	$(CC) $(MINGWOPT) -build mongoose.c main.c build\res.o \
-	-lws2_32 -ladvapi32 -o $(PROG).exe
+	$(CC) $(MINGWOPT) mongoose.c main.c build\res.o \
+	-lws2_32 -ladvapi32 -lcomdlg32 -o $(PROG).exe
 
 # Build for Windows under Cygwin
 #CYGWINDBG= -DDEBUG -O0 -ggdb