Bad file descriptor

When i try to compile my code, it gives me this. Please help

Try deleting the triplex.obj file

I deleted the triplex.obj file and this happens:


and also can i know why this happened, the code was compiling through out, all of a sudden this started happening

After i deleted the triplex.obj file, i created another dummy file and name it TripleX.cpp and it started to compile.

But, I haven’t marked this problem as solved because i still want to know why this happened all of a sudden when it’s been working all along

This happened again when i created another file and tried starting my code all over to see if i could reproduce it and now creating a dummy file doesnt work

What do you mean by dummy file? triplex.obj is the compiled .cpp code the linker takes that and creates an executable out of it

more info: https://stackoverflow.com/questions/6264249/how-does-the-compilation-linking-process-work

What i meant by dummy file, sorry if thats a bad description:
its when i create a txt file by right clicking > New > Text Document. Then renaming it to “TripleX.obj”. It worked for triplex when i had this issue. I tried to reproduce triplex by myself to see if i had fully understood the lecture and then the issue came up again, doing the dummy file renaming stuff did not work this time.

Could you pls show the whole code, it will be fine and clear and I can help you if you send me the whole VS Code pic.

Do you have an antivirus software?

Maybe he named his file another name except triplex.

Just windows firewall, the issue still persists

i’ve tried turning it off too, still the same

its named tripleh and i tried compiling with “cl tripleh.cpp”

Wow, i just solved the problem myself.
Usually i would just click on terminal and select new terminal…so i went back to see how the terminal was created for the triple x game by right clicking and selecting integrated terminal and that solved the problem. Thank you and sorry for wasting your time

2 Likes

No worries :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.