diff --git a/Code/Common/otbMacro.h b/Code/Common/otbMacro.h
index 6de6790e2f17c995e7da335370b4f024545f487f..318f8f911a8e3b064fb3f7ef63f6c65ddc3e5966 100755
--- a/Code/Common/otbMacro.h
+++ b/Code/Common/otbMacro.h
@@ -49,6 +49,20 @@
 }
 #endif
 
+#if defined(OTB_LEAN_AND_MEAN) || defined(__BORLANDC__)
+#define otbMsgDevMacro(x)
+#else
+  #ifdef OTB_ACTIVE_MSG_DEV_MACRO
+    #define otbMsgDevMacro(x) \
+    { { ::itk::OStringStream itkmsg; \
+      itkmsg << " Msg Dev: " x << "\n"; \
+      ::itk::OutputWindowDisplayDebugText(itkmsg.str().c_str());} \
+     }
+  #else
+     #define otbMsgDevMacro(x)
+  #endif
+#endif
+
 
 /** This macro is used to print warning information (i.e., unusual circumstance
  * but not necessarily fatal.) Example usage looks like: