--- a/cmajor++/Cm/Cm.Compiler/Main.cpp
+++ b/cmajor++/Cm/Cm.Compiler/Main.cpp
@@ -16,6 +16,7 @@
 #include <Cm.Core/Flags.hpp>
 #include <Cm.Core/Statistics.hpp>
 #include <Cm.Core/Function.hpp>
+#include <Cm.Core/DebugInfo.hpp>
 #include <Soul.Util/TextUtils.hpp>
 #include <Soul.Parsing/Exception.hpp>
 #include <iostream>
@@ -86,9 +87,11 @@
         InitDone initDone;
         std::string platformBits = GetPlatformBits();
         std::string platformPathSeparator = std::string(1, GetPlatformPathSeparatorChar());
+        std::string cmajorVersionStr = std::string("Cmajor ") + compilerMode + " compiler version " + version + " " + platformBits;
+        Cm::Core::SetCmajorVersionStr(cmajorVersionStr);
         if (argc < 2)
         {
-            std::cerr << "Cmajor " << compilerMode << " compiler version " << version << " " << platformBits << std::endl;
+            std::cerr << cmajorVersionStr << std::endl;
             std::cerr << "usage: " << compilerName << " [options] {file.cms | file.cmp}" << std::endl;
             std::cerr << "build solution file.cms or project file.cmp\n";
             std::cerr << "--------------------------------------------------------------------------\n";