title: Code compiles in CLion but not in Command Prompt
body: <p>I am trying to a C++ library and need (want) to use nested namespaces in order to increase readability of the code. However, I am running into a problem when trying to compile my code in the Windows Command Prompt with <code>g++ main.c</code>.</p>
  
  <p>The code below is an example of what I will have -- a nested namespace and then some functions or classes:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>namespace gpc::warning {
      void raiseError() {
          std::cout &lt;&lt; "Error...\n";
          exit(1);
      }
  }
  </code></pre>
  
  <p>The code below is an example for my <code>main.c</code> file:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt;
  #include "Warning/raise.hpp"
  
  int main() {
      std::cout &lt;&lt; "Hello, World!" &lt;&lt; std::endl;
      gpc::warning::raiseError();
  
      return 0;
  }
  </code></pre>
  
  <p>When I run this simple probram in CLion, it compiles and runs perfectly, however when I run the code in the Windows 10 Command Prompt, I get the following error telling me something about the namespaces:</p>
  
  <pre><code>In file included from main.cpp:2:0:
  Warning/raise.hpp:10:14: error: expected '{' before '::' token
   namespace gpc::warning {
                ^
  Warning/raise.hpp:10:16: error: 'warning' in namespace '::' does not name a type
   namespace gpc::warning {
                  ^
  main.cpp: In function 'int gpc::main()':
  main.cpp:9:10: error: 'gpc::warning' has not been declared
       gpc::warning::raiseError();
            ^
  main.cpp: At global scope:
  main.cpp:12:1: error: expected '}' at end of input
   }
   ^
  </code></pre>
  
  <p>I was wondering what I am doing wrong and how I can fix this problem.</p>
  
  <p>Thanks!</p>