diff --git a/src/plugins/directshow/directshow.pro b/src/plugins/directshow/directshow.pro
index 982741a1122272db52d3b5f8991a23d6b747ff3d..5b59ccfe08036371804c48c70cdd70dfeae4b452 100644
--- a/src/plugins/directshow/directshow.pro
+++ b/src/plugins/directshow/directshow.pro
@@ -1,5 +1,7 @@
 TARGET = dsengine
-
+win32:!qtHaveModule(opengl) {
+    LIBS_PRIVATE += -lgdi32 -luser32
+}
 PLUGIN_TYPE=mediaservice
 PLUGIN_CLASS_NAME = DSServicePlugin
 load(qt_plugin)