diff -ruN a/src/examples/cpp/console.cpp b/src/examples/cpp/console.cpp
--- a/src/examples/cpp/console.cpp	2008-04-01 02:34:52.000000000 +0400
+++ b/src/examples/cpp/console.cpp	2012-10-04 18:36:51.967508056 +0400
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+#include <stdio.h>
+#include <string.h>
 #include <stdlib.h>
 #include <log4cxx/logger.h>
 #include <log4cxx/consoleappender.h>
diff -ruN a/src/main/cpp/inputstreamreader.cpp b/src/main/cpp/inputstreamreader.cpp
--- a/src/main/cpp/inputstreamreader.cpp	2008-04-01 02:34:09.000000000 +0400
+++ b/src/main/cpp/inputstreamreader.cpp	2012-10-04 18:33:23.693059781 +0400
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+# include <string.h>
 #include <log4cxx/logstring.h>
 #include <log4cxx/helpers/inputstreamreader.h>
 #include <log4cxx/helpers/exception.h>
diff -ruN a/src/main/cpp/socketoutputstream.cpp b/src/main/cpp/socketoutputstream.cpp
--- a/src/main/cpp/socketoutputstream.cpp	2008-04-01 02:34:09.000000000 +0400
+++ b/src/main/cpp/socketoutputstream.cpp	2012-10-04 18:33:36.920136574 +0400
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+#include <string.h>
 #include <log4cxx/logstring.h>
 #include <log4cxx/helpers/socketoutputstream.h>
 #include <log4cxx/helpers/socket.h>
