Hello all I have a question about compiling what I've written for recover.c

The compiler shows me this message when I try to compile recover: " expected an exit code of 0, not standard error of recover.c:14:10: fatal error: 'bmp.h' file not found"


Here's what I've written so far: https://gist.github.com/ehahehah/3eb11f6613ac90ed6242

P.S. "bmp.h" is included in jpg directory. It wasn't originally there but I placed it there. Does that mean I cannot include "bmp.h" because it wasn't originally in the jpg directory?

2 Answers 2


You really don't need the bmp.h file at all in order to complete your work here. In fact, I don't think you really want it. The main reason you needed it before was for the particular set up of the bmp file, but you don't have to worry about distinguishing between file headers and such.

Instead of taking bmp.h just so you can use the typedef BYTE, you can use what BYTE was actually just an alias for: unint8_t. (Technically, you could define the alias again, but it's rather unnecessary.) You can use unint8_t in all the same ways you were using BYTE.


I had a similar problem and found that the best way to get around it was to get rid of the bmp.h header, and, at least in your case, replace the BYTE JPEG[512] with int* JPEG = malloc(sizeof(int) * 512.

Hope this helps!


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .