diff --git a/Makefile b/Makefile
index b43cb734ba5cfec098a2f9e9bee15b04af3d02c8..85201c0eb678d000d7dbc9d33aee6dc629c72c27 100644
--- a/Makefile
+++ b/Makefile
@@ -2654,8 +2654,8 @@ endif
 
 
 CPP_PLUGIN_SRC = \
-    src/compiler/cpp_plugin.cpp \
-    src/compiler/cpp_generator.cpp \
+    src/compiler/cpp_plugin.cc \
+    src/compiler/cpp_generator.cc \
 
 CPP_PLUGIN_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CPP_PLUGIN_SRC))))
 
@@ -2675,8 +2675,8 @@ endif
 
 
 RUBY_PLUGIN_SRC = \
-    src/compiler/ruby_plugin.cpp \
-    src/compiler/ruby_generator.cpp \
+    src/compiler/ruby_plugin.cc \
+    src/compiler/ruby_generator.cc \
 
 RUBY_PLUGIN_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(RUBY_PLUGIN_SRC))))
 
diff --git a/build.json b/build.json
index 8dfd5c4f9771c93ee0fc8e49798b89c97c07defa..1e465404a57cc3dd1790f417f6a86fb13e4412f0 100644
--- a/build.json
+++ b/build.json
@@ -422,8 +422,8 @@
       "c++": true,
       "secure": false,
       "src": [
-        "src/compiler/cpp_plugin.cpp",
-        "src/compiler/cpp_generator.cpp"
+        "src/compiler/cpp_plugin.cc",
+        "src/compiler/cpp_generator.cc"
       ],
       "headers": [
         "src/compiler/cpp_generator.h",
@@ -437,8 +437,8 @@
       "c++": true,
       "secure": false,
       "src": [
-        "src/compiler/ruby_plugin.cpp",
-        "src/compiler/ruby_generator.cpp"
+        "src/compiler/ruby_plugin.cc",
+        "src/compiler/ruby_generator.cc"
       ],
       "headers": [
         "src/compiler/cpp_generator.h",