title: What is the appropriate Unix-POSIX based tool chain to use in Windows
body: <p>Let's say I have retrieved some <code>C/C++</code> original and unmodified distribution libraries that were specifically designed for the <code>Unix-POSIX</code> based environments where the original developers who designed their code wrote them specifically for their environments - systems and these libraries originally are not portable to modern <code>Windows</code> systems. </p>
  
  <p>What I would like to be able to do is to at the least build the needed static or dynamic libraries to be able to link them against my own Visual Studio projects.</p>
  
  <p>I know that with <code>Mingw(clang)</code> you only need the <code>MSVC</code> run-time libraries as it doesn't have any need of the <code>POSIX</code> dll dependencies as it uses the <code>Win32</code> libraries directly. However, it doesn't have all of the <code>Unix</code> environment features that <code>Cygwin(gcc/g++)</code> does and for any <code>C/C++</code> code that relies on native <code>POSIX</code> functionality such as <code>fork()</code>, <code>mmap()</code>, etc. would have to be re-implemented into the <code>Win32</code> equivalents for proper compilation, linking, and running of the application.</p>
  
  <p>With <code>Cygwin</code> I'm more exposed to nearly all of the <code>Unix-POSIX</code> features with a little higher learning curve and to integrate these libraries that are built by <code>Cygwin's</code> compiler(s), they would rely on <code>cygwin1.dll</code> to be able to run on a Windows machine. </p>
  
  <hr>
  
  <p><em>A Primary Example:</em></p>
  
  <p>The current libraries that I'm trying to build to work with <code>Visual Studio</code> are <code>GNU's:</code> <code>GMP</code>, <code>MPIR</code>, <code>MPFR</code>, <code>MPFRC++</code>.</p>
  
  <p>So far I have successfully been able to build <code>MPIR</code> in <code>Visual Studio 2017</code> with the aid of <code>Python</code> and <code>Windows</code> version of <code>Yasm</code>. However, when trying to build <code>MPFR</code> it requires the dependency of <code>GMP</code>. So now I have to build <code>GMP</code>.</p>
  
  <p>I could use <code>Mingw</code> to build <code>GMP</code> which may be in some ways a little easier, but by using <code>Gygwin</code> and building <code>GMP</code> through the <code>Unix/Linux/POSIX</code> environment I would be exposing myself to the functionality of <code>Unix/POSIX</code> systems. </p>
  
  <p><strong>Note</strong> - I'm primarily familiar with <code>Windows</code> environments and until recently have never worked with or on any <code>Unix</code> based <code>OS</code>. So there is a bit of a learning curve for me. I'm doing all the research and reading that I can on my own which is not a problem. It provides good experience with every bit of trial and error.</p>
  
  <hr>
  
  <p>What I would like to know is when working on a <code>Windows</code> machine; what would be the preferable method between the two case scenarios to build <code>POSIX</code> designed libraries to be able to link properly into <code>MSVC</code> <code>Window's</code> based applications? Another words, I would like to efficiently convert <code>POSIX</code> specific libraries to be able to work on my current platform or machine. Notice that I did not say that I wanted to "rewrite" the libraries to make them portable to any arbitrary environment. In this specific case I only need them to run on my <code>Windows</code> environment. Or any other appropriate method. I will be using some <code>C</code> and some <code>C++</code> libraries to be linked into my <code>MSVC</code> <code>c++17</code> project(s). (I may also have some of the terminology wrong in some of my above statements or assumptions as I'm not familiar with <code>Unix-POSIX</code> environments). </p>