title: Cannot open output file ___.exe: Permission denied
body: <p>Whenever I run a program using classes, I keep getting this error:</p>
  
  <blockquote>
    <p>/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot open output file Homework6.exe: Permission denied</p>
  </blockquote>
  
  <p>I had to reset my computer last week and reinstall my IDE (CLion), along with Cygwin and the corresponding files. I followed along with my instructor's video of setting CLion up, but I'm still having issues. Is there a file I need to install again? This is the full error I get in CLion:</p>
  
  <blockquote>
    <p>C:\Users---.CLion2017.2\system\cygwin_cmake\bin\cmake.exe --build<br>
    C:\Users---\CLionProjects\CS1410\Homework6\cmake-build-debug --target Homework6 -- -j 2 Scanning dependencies of target Homework6 [ 33%] Building CXX object CMakeFiles/Homework6.dir/testArray.cpp.o [ 66%] Linking CXX executable Homework6.exe /usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot open output file Homework6.exe: Permission denied </p>
    
    <p>collect2: error: ld returned 1 exit status </p>
    
    <p>make[3]: *** [CMakeFiles/Homework6.dir/build.make:121: Homework6.exe] Error 1 </p>
    
    <p>make[2]: *** [CMakeFiles/Makefile2:68: CMakeFiles/Homework6.dir/all] Error 2 </p>
    
    <p>make[1]: <strong>* [CMakeFiles/Makefile2:80: CMakeFiles/Homework6.dir/rule] Error 2 make: *</strong> [Makefile:118: Homework6] Error 2</p>
  </blockquote>