title: How to approach porting a game engine to another platform?
body: <p>I've run into this problem several times before and wanted to hear what other's experience and advice is. Assume you have a working and stable but relatively small game engine that works on only one platform, and you want to port it to another platform.</p>
  
  <p>The first step is obvious: you take the code, link it to the platforms libraries instead of the old ones, make necessary changes to the project or target build settings and then hit build. About five to twenty thousand errors appear. Of course there are a lot of duplicates but it immediately raises the question what the next steps should be? </p>
  
  <p>How do you approach porting a game engine to another platform, or any platform-specific code that can't just be compiled on the other platform due to inherent changes in system and API design? How do you wade through all these error? How do you identify the parts that should be approached first?</p>
  
  <p><strong>In general: how should i approach porting existing source code?</strong></p>
  
  <p>I'm looking for general advice on how to approach a source code port. Assume the programming language and compiler are the same on both platforms, so it's mostly API changes.</p>