Sublime Forum

Getting error during compile

#1

i am getting errror ----> file not recognized: file truncated;

and sometime i am getting this type of error —>
file:///C:/mingw/mingw32/bin/ld.exe:%20cannot%20open%20output%20file%20E:/Jatiwal/first.exe:%20Permission%20denied

1 Like

#2

i am also getting this errror

0 Likes

#3

Looks to me like you’re trying to compile input.txt instead of your C++ file.

1 Like

#4

I faced the same problem. Later on, I found that it was happening only because before giving the build command, I had not saved the inputf.in file. Just a ctrl + s :slight_smile:
But after the first save, in the later builds and inputs even if I don’t save, it works as if it were auto saved.

0 Likes

#5

That’s because the option Tools > Save all on build in the menu defaults to being turned on. When it’s enabled, any file you have open that has a name associated with it on disk will automatically be saved before the build launches.

It has no effect on buffers that represent files you created but never saved, to spare you the quiet insanity of being prompted on every build to save things you might not want saved.

0 Likes

#6

It’s because you are accidentally compiling ‘input.txt’ file as your cursor is pointing to ‘input.txt’ column.

To solve this, after you have entered in the input column, click anywhere in your cpp code column and then compile.

1 Like

#7

thank you so much, was stuck for hours

0 Likes