title: How to compile Windows Visual C++ code on Linux
body: <p><strong>Note: The intent of this question was to find if there exists a standard way of developing in VC for Windows and porting that code smoothly (meaning, making as few edits to the code as possible) over to a Linux system so that it can be compiled into an executable and run.</strong></p>
  
  <p><strong>Based on the answers I've received I can see that there is a misunderstanding. Therefore, I'm going to break this question into two separate questions. One being my original (revised question) and the other being my specific issues and how to fix it. (I'll add the links to this question once they're posted).</strong></p>
  
  <p><em>Note: I'm pretty new to C++ and compiling with makefiles.</em></p>
  
  <p>I've been creating a C++ program that will run on a Linux server and so far I've been using Visual Studio (<strong><em>Window's current release</em></strong>) to write all the code. To be safe, before I started writing my program I attempted to create some basic C++ files in VC, transfer them over to my server then compile them with g++ and run the executable. Everything worked out so I thought:</p>
  
  <p><em>"Hey, I can go ahead and write my <strong>entire</strong> program, follow the same process and everything will be fine!"</em></p>
  
  <p>Clearly, I was <strong>wrong</strong> and that's why I'm here.</p>
  
  <p>When I run my makefile I get dozens of errors and I'm not exactly sure how to approach the situation. A large number of the error messages seem to be hinting at my use of vectors (which of course, run fine when compiling with VC).</p>
  
  <p>I've had a look at the following questions: </p>
  
  <p><a href="https://stackoverflow.com/questions/9171414/how-to-compile-in-visual-studio-2010-for-linux">How to compile in Visual Studio 2010 for Linux</a></p>
  
  <p><a href="https://stackoverflow.com/questions/3298053/port-visual-studio-c-to-linux?rq=1">Port Visual Studio C++ to Linux</a></p>
  
  <p><a href="https://stackoverflow.com/questions/11183217/compiling-visual-c-code-in-linux">Compiling Visual C++ code in Linux?</a></p>
  
  <p>But I can't really find a direct solution to my issue (for example I'd prefer to avoid installing VC on a Linux platform and just working from there).</p>
  
  <p>I've also looked into (<em>and tried using</em>) <a href="https://www.winehq.org/docs/winegcc" rel="noreferrer">wineg++</a> but it didn't seem to change anything upon compilation.</p>
  
  <p><strong>How should I go about this issue?</strong></p>
  
  <p><strong>Meaning: Is it common practice to develop on Windows VC then port over to Linux? If so, is there a standard way of ensuring that everything goes smoothly? Or is it just a matter of knowing how your compiler on Linux works and coding appropriately so that no errors occur?</strong></p>
  
  <p>Preferably a solution that allows me to keep developing on Windows and simply port over everything to Linux when I'm done. Also if possible, try to make any answers as simple as possible, I'm still very amateur when it comes to most of this stuff.</p>
  
  <p><em>Edit: I'd also like to mention that I'm not really using any crazy libraries. Just <strong>math.h</strong> and <strong>vector</strong>.</em></p>
  
  <p>Some examples of errors are:</p>
  
  <p>Initializing a vector with some doubles:</p>
  
  <p><a href="https://i.stack.imgur.com/2RL3E.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2RL3E.png" alt="enter image description here"></a></p>
  
  <p>Corresponding compilation error:</p>
  
  <p><a href="https://i.stack.imgur.com/62LJS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/62LJS.png" alt="enter image description here"></a></p>