title: Calling Cygwin from python fails with: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
body: <p>I have a C program compiled with GCC using Cygwin, which I want to run from a python program in windows 7. I got as far as using the subprocess module, but was getting the "error while loading shared libraries..." and no other information.</p>
  
  <p>Googling resulted in the following two questions; one with no answer and one with an accepted answer that didn't (on first reading) fully explain how to fix it, and a comment promising a full solution from almost two years ago. </p>
  
  <p><a href="https://stackoverflow.com/questions/20392789/error-while-loading-shared-libraries-cannot-open-shared-object-file-no-">error while loading shared libraries: ?: cannot open shared object file: No such file or directory</a></p>
  
  <p><a href="https://stackoverflow.com/questions/10092730/launching-cygwin-built-executable-from-java-on-windows-7-fails-with-error-whilesuch">Launching CYGWIN-built executable from Java on Windows 7 fails with &quot;error while loading shared libraries: ?: No such file or directory&quot;</a></p>
  
  <p>I've in fact fixed my issue, but I wanted to document it here in case anyone else has the same issue.</p>