Etc
[vscode] C++ exe 파일 cannot open output file: Permission denied 문제 해결
NaDuck
2023. 2. 18. 20:58
내 로컬에서 발생한 에러 전문
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot open output file C:\Users\user\Desktop\c_c++_test/problem9.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
C++ 언어로 코딩 문제를 풀고 있었는데 바로 전까지 컴파일이 잘 되더니만 갑자기 위처럼 문제가 발생했다.
해결 방법: 현재 실행중인 exe실행 파일을 종료시킨다. (ctrl + c)
알고보니 아까 실행하던 C++ 파일이 아직 실행 중이라 (아직 입력받기를 기다리는 중이라던가) 그걸 먼저 종료시킨 다음에 새로 컴파일해야 한다!
vscode windows: cannot open output file test.exe: Permission denied
I tried to run the basic C++ code on vscode I get as error: Error: cannot open output file test.exe: Permission denied. I am able to run Python code on VS Code but facing issue with C++ code only.
stackoverflow.com