diff --git a/src/StaticModel.cc b/src/StaticModel.cc
index 780e3ed80bc9faad3ad794dfd3fe0178b65f722c..93944b89d5825476a71db128b47b32fd8303e5e9 100644
--- a/src/StaticModel.cc
+++ b/src/StaticModel.cc
@@ -287,10 +287,6 @@ StaticModel::writeStaticFile(const string& basename, bool use_dll, const string&
     }
   create_directories(model_dir / "bytecode" / "block");
 
-  // Legacy representation
-  if (use_dll)
-    writeModelCFile<false>(basename, mexext, matlabroot);
-
   /* PlannerObjective subclass or discretionary optimal policy models don’t
      have as many variables as equations; bytecode does not support that
      case */