5

I have an issue with this message that appears every time I try to compile any kind of Code in C++ language. I'm really tired trying to find a solution and its so annoying cause every time I want to test my code, this message (There is no disk in the drive. Please insert a disk into drive E:.) pop's up and need to click cancel/try again like 10 times in a row to remove it.

I found some relation about my issue and this thread: How can I get rid of an empty Drive Letter?

But the thing is, I tried to follow each steps, but since the start I can't even do the first step (Insert a removable disk in the removable drive before you start the computer.), I do this, but my PC don't place the Removable Drive in the E: spot. I click on preferences to check info about this E: Drive, but doesn't have space. Its like an imaginary drive (does nothing).

I can't figure out what's going on. Some Pics for help:

enter image description here

Any idea on how to remove this E: spot?

3
  • You're trying to solve your problem by solving a different one (the XY problem). Describe how are you compiling your C++ code and then we will be able to help you better regarding your specific problem. Nov 5, 2014 at 15:41
  • I just saw this, in the tittle on the window error messages says: (g++.exe - No disk) and other two files. As we know, this file are located in the Mingw installation folder, in my case the default one (C: drive).
    – vitaminar
    Nov 5, 2014 at 16:29
  • I'm just using Sublime Text and sometimes I switch to CodeBlocks. But both IDE's pop's up the same messages.
    – vitaminar
    Nov 5, 2014 at 16:51

3 Answers 3

6

Reconfirming Doktoro Reichard's post, it's likely you're running into this known issue with hard-coded references to e: and i: in MinGW:

https://sourceforge.net/p/mingw/bugs/2108/

For example:

$ strings /c/mingw/bin/gcc.exe | grep '[a-z]:/[a-z]'
e:/p
e:/p/giaw/mingw/lib/gcc/
e:/p/giaw/mingw/libexec/gcc/
e:/p/giaw/mingw/bin/
e:/p/giaw/mingw
e:/p/giaw/mingw/share/locale
i:/p/giaw/mingw/share/locale
i:/p/giaw/mingw/share/locale

The way I resolved this is to remove any/all E: or I: drives on my system. By using Disk Management, I was able to rename a card reader from E: to not-E: and the error went away.

– Dave

1
  • Thanks, I read a lot of material and stuff about this, and this is the fix to this issue. Thanks for the example, could help other people. Sorry didńt post earlier, I just forgot about this cause I just installed ubuntu.
    – vitaminar
    Mar 10, 2015 at 17:54
2

I also started having this issue just out of nowhere. Yesterday i was compiling and executing code without a hitch and today all of a sudden i get an error saying "There is no disk in the drive. Please insert a disk into drive E: ". . .

All that had changed between now and yesterday was that i had used my DVD drive, which is drive E, to install a program. So somehow it affected GCC. All I did was open my DVD Drive and close it again and all seems fine now.

I realise my answer is not nearly as technical as the others but sometimes the solution need not be technical or complicated. Sometimes a simple "open, close" will do wonders! ;) Just thought i would share how i solved the issue.

1
  • 1
    I got the same error today after having inserted a new flash drive. I solved the problem with a reboot.
    – James
    May 18, 2016 at 15:37
1

It seems that your C++ compiler/build environment is somewhere referring to a drive E: even though you don't have one.
You will have to get rid of this non-functional reference to stop this.

Maybe you've got E: mentioned somewhere as an INCLUDE of LIB path ?
Are you using a makefile or solution file made be someone else that has E: mentioned somewhere ?

Check the compile/build logfile for remarks like "can't open file E:\xxxxxxx". That might give a clue where the problem is exactly located.

4
  • The logfile didn't say anything, cause once I close this Error, my code runs perfectly, I just tested a single Hello World Program, and works good. The thing is to run any code, this error shows up first and you know, I need to click 10 times to close before the program could work. My code works fine, noting to do with the E: spot. I just read again this Error Messages, and could be some single files in the Mingw directory placed on the default C: Drive. The tittle of the window error messages shows (g++.exe - No disk) for example, and other two different names.
    – vitaminar
    Nov 5, 2014 at 16:25
  • Check your environment vars. Maybe some of those refer to E:. As several of your programs exhibit this behavior it is most likely a system wide issue.
    – Tonny
    Nov 5, 2014 at 18:35
  • 1
    Since you mentioned MinGW, I looked a little about the specific string you mentioned. As it turns out, it appears to be a bug mentioned here and also in another places in the bugtracker if you look around. Either try to update your current MinGW version or try to follow the steps described in the bug report. Nov 5, 2014 at 21:50
  • Thanks, really appreciate it. Gonna try to fix this issue with the link you gave it to me.
    – vitaminar
    Nov 6, 2014 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.