0

I've tried installing the gcc by my self. When i tried to run my C code using Visual Studio, several errors are found. Any solution for my problem?

i have installed MinGW and followed the instructions on youtube

what i expect in the terminal is Hello World, what i got is this error about access denied // I'm using Win 10 //The Youtube Video : https://youtu.be/mWzOu-_VNAk


PS

c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: cannot open output file Untitled-1.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
PS C:\Users\farhandika\projects\projects\projects\helloworld>


Gerhardh
  • 11,688
  • 4
  • 17
  • 39
  • By "PC" do you mean "Windows"? If so, what version? – tadman Oct 16 '19 at 16:24
  • Why MinGW and not Visual Studio Express if you want to write C code? Building C code is often non-trivial, so you'll either need to compose a `Makefile` or CMake equivalent, if not use an IDE like Visual Studio Express that can help you through the process of building a viable executable. – tadman Oct 16 '19 at 16:24
  • Welcome on SO! Please take the [tour], learn [ask], and provide a [example]. In your case provide all that is necessary to repeat what you did. Especially **which** YouTube video? Please [edit] your question with additional information, don't hide it in comments. – the busybee Oct 16 '19 at 18:02
  • i'm using win 10. The 1st run was a success – Frank Filler Oct 17 '19 at 06:05
  • Welcome to SO. I cannot find "this error about access denied". The message you show indicates "file not found" which is not the same. – Gerhardh Oct 17 '19 at 06:23
  • i think i posted the wrong line – Frank Filler Oct 17 '19 at 07:33
  • OK. That's a totally different story. In most cases your executable is already running and hence the file cannot be overwritten. – Gerhardh Oct 17 '19 at 07:55
  • Possible duplicate of [Permission denied - cannot open outputfile](https://stackoverflow.com/questions/19855571/permission-denied-cannot-open-outputfile) – Gerhardh Oct 17 '19 at 08:06
  • Searching for "[c] mingw32/bin/ld.exe: cannot open output file" produces multiple results that are very near to your problem. – Gerhardh Oct 17 '19 at 08:07

0 Answers0