Reputation: 67
I have installed the Sublime text 3 and I want to compile C++ programs in it. I referred to this article for making Sublime compatible for compiling C++ programs but I kept getting the following error
C:/Program Files (x86)/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/5.1.0/../../../../mingw32/bin/ld.exe: cannot open output file C:\Users\USER\Downloads\CCDSAP\sublime/test1.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
[Finished in 1.9s with exit code 1]
[shell_cmd: g++ -std=c++11 -Wall "C:\Users\USER\Downloads\CCDSAP\sublime\test1.cpp" -o "C:\Users\USER\Downloads\CCDSAP\sublime/test1" && "C:\Users\USER\Downloads\CCDSAP\sublime/test1"]
[dir: C:\Users\USER\Downloads\CCDSAP\sublime]
[path: C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files\MATLAB\R2017a\runtime\win64;C:\Program Files\MATLAB\R2017a\bin;C:\Program Files\Git\cmd;C:\Program Files\Amazon\AWSCLI\;C:\Program Files\OpenVPN\bin;C:\WINDOWS\System32\OpenSSH\;C:\Android;C:\Windows\System32;C:\Program Files\Java\jdk-11.0.1\bin;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Users\USER\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\USER\AppData\Local\Programs\Python\Python36\;C:\Users\USER\AppData\Local\Microsoft\WindowsApps]
After facing this error I read this question on StackOverflow and I again tried with the build code given in the above link. But it is again giving me the same error.
Note that I am able to compile and run programs through CodeBlocks IDE very smoothly and I am also able to invoke the g++ command through the command line on Windows. Can someone please help? Thank you.
Upvotes: 0
Views: 1069
Reputation: 2059
If there are permission problems, but the application is not running, then try to delete the .exe file.
Upvotes: 1
Reputation: 385144
This suggests that your program is already running.
It cannot be replaced by a new version if it is running.
You should close it before proceeding.
Upvotes: 1