Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such file or directorycollect2.exe: error: ld returned 1 exit status

I am getting this error; I tried to resolve it but I was not able to. To check the issue, I have first tried it in VS-CODE then on DEV-CPP but both show the same error which is basically not regarding my program. But I am getting that:

#include<iostream>
using namespace std;
int main()
{
    cout<<"Running";
    return 0;
}

That's the error:

cannot open output file newFile.exe: No such file or directorycollect2.exe: error: ld returned 1 exit status

All of my old programs which were running showing the same issue.

like image 475
Karan Avatar asked Jan 01 '26 11:01

Karan


1 Answers

Today I have resolved this problem by resetting my PC. If there is another way, please tell me. I had done so because None of my program was running neither Java nor CPP.

like image 89
Karan Avatar answered Jan 03 '26 01:01

Karan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!