P
P
performer12020-10-05 13:33:57
C++ / C#
performer1, 2020-10-05 13:33:57

Error: collect2.exe: error: ld returned 1 exit status, how to fix?

I wrote in dev c++, the most common compiler, TDM GCC, wrote the code (first the necessary code, then just "Hello" to check). And every time this was output - c:\program files (x86)\dev-cpp\mingw64\x86_64-w64-mingw32\bin\ld.exe cannot open output file C:\Nurzhan\Programming\с++\main.exe : Permission denied
and this is C:\Nurzhan\Programming\c++\collect2.exe [Error] ld returned 1 exit status
Compiled via cmd too, but no result
How to fix this?
I'm a student!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2020-10-05
@jcmvbkbc

ld.exe cannot open output file C:\Nurzhan\Programming\c++\main.exe: Permission denied
How do I fix this?

It looks like the executable file is running, so Windows does not allow it to be overwritten.
Kill the process started from main.exe, then compile.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question