dimanche 25 octobre 2020

/mingw32/bin/ld.exe: cannot open output file HelloWorld.exe: Permission denied collect2.exe: error: ld returned 1 exit status

#include<iostream>
using namespace std;
int main(){
    cout << "Hello World\n";
    return 0;
} 

This is the Simple program in which I am just printing 'Hello World' but this error occurs everytime.

[Running] cd "e:\C++\Data Types\" && g++ HelloWorld.cpp -o HelloWorld && "e:\C++\Data Types\"HelloWorld
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot open output file HelloWorld.exe: Permission denied
collect2.exe: error: ld returned 1 exit status

I have tried everything but unable to produce HelloWorld.exe file and run this code.

Aucun commentaire:

Enregistrer un commentaire