diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 36667ac5666bb0d5da58d2b55b38b0ef9ca72257..2ca82aefa16be5c5ad4cadf9866b15908ba0e9f8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,6 +16,11 @@
 # Make sure to find Debug.h
 INCLUDE_DIRECTORIES(BEFORE ${PROJECT_SOURCE_DIR}/src)
 
+# add flag to compile qld.cc
+IF(WIN32)
+ADD_DEFINITIONS("/D __STDC__")
+ENDIF(WIN32)
+
 SET(SOURCES
   FootTrajectoryGeneration/FootTrajectoryGenerationAbstract.cpp
   FootTrajectoryGeneration/FootTrajectoryGenerationStandard.cpp