diff --git a/Code/IO/otbJPEG2000ImageIO.h b/Code/IO/otbJPEG2000ImageIO.h
index cea9afdc125c2e990689bf7e3f78324aa3891f38..ed0b33e987ae16eb5b35b362fa7b02082542a983 100755
--- a/Code/IO/otbJPEG2000ImageIO.h
+++ b/Code/IO/otbJPEG2000ImageIO.h
@@ -24,7 +24,9 @@
 #define USE_OPJ_DEPRECATED
 #endif
 
+extern "C" {
 #include "openjpeg.h"
+}
 
 namespace otb
 {