0
I have a folder with some simple C codes, I can compile, but the code does not run correctly in the terminal of sublime text 3.
Does not return any information or display this message due to the code being looped:
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot open output file teste.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
[Finished in 1.2s]
I tried the solution of a problem similar to mine here in stack overflow, searching for the service "Application Experience", but this service is not appearing on my computer, besides the problem is a little different.
I’m using the build configured this way:
{
"cmd" : ["gcc", "$file_name", "-o", "${file_base_name}.exe"],
"selector" : "source.c",
"shell" : true,
"working_dir" : "$file_path",
"variants":
[
{
"name": "Run",
"cmd" : ["gcc", "$file_name", "-o", "${file_base_name}.exe","&&", "${file_base_name}.exe"]
}
]
}
Provide more details on your question to get richer, tell us which IDE you are using, how you are using it etc..
– user148754
It seems to me that the message: "cannot open output file test.exe: Permission denied" is quite clear. You are trying to write the "test.exe" file to a folder for which you do not have the proper permissions.
– anonimo
But how does this explain the fact that I can compile and execute other C codes in the same folder, in addition to other languages like C++ and Python?
– Async
The file must be running in a loop. If applicable va security options([CTRL]+[ALT]+[DEL]) select the task manager and look for its executable and close it.
– Augusto Vasques
@Augustovasques I just checked, the code is being compiled, is executed, but does not return anything and is still running, while running the code again occurs the denied permission error. Now I need to figure out why I’m not returning any information.
– Async
I made some fixes in the post, due to the problem not being identified correctly at first.
– Async