title: Anyone know how to solve the error of "collect2.exe: error: ld returned 1 exit status" when a program in C is running?
body: <p>First of all I'm at the first year of computer science so I'm a beginner in programming yet, then forgive me for my lack of knowledge. Well, my problem basically is an error that is shown in the screen everytime when I try to run(by the way I'm using Sublime Text) a program in C. In this case was a simple code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main() {    
      //print the heading of the game
      printf("*****************************************\n");
      printf("* Wellcome to the our guessing game *\n");
      printf("*****************************************\n");
      int secretnumber =  42;
      int guess;
  
      printf("What is your guess?");
      scanf("%d", &amp;guess);
      printf("Your guess was %d \n", guess);
  }
  </code></pre>
  
  <p>OUTPUT:
  c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: cannot open output file Olamundo.exe: Permission denied
  collect2.exe: error: ld returned 1 exit status
  [Finished in 0.3s]</p>
  
  <p>You know, i tried some solutions like move the folder where the executable lies and place it in the root(in my case Mateus(C:)), give all the permissions to the folder, turn off the antivirus(in my case i just using the Windows defender), finish the task using the the Task manager but nothing worked. Please, help me i really don't know what else i can do. </p>