Several questions about the code and its behavior I have so far.
Q: The executable do not want to process my BMP file, can you fix this?
A: I can but I will not. BMP format is not very complex one but its full support may took a considerable effort that I do not want to make. My goal was to write JPEG encoder not BMP parser so the parser is very basic and can read only true color (24 bit) BGR images with a lot of other restrictions.
Q: I have used the .exe compiled for Windows and a test bitmap but the encoding isn't good (it is kind of skewed). Could you please explain this for me?

A: Image width/height should be a multiple of 8 (at least) but 16 is even better. JPEG encoder processes images by 16x16 pixel blocks (if chroma subsampling is used) - read doc/Readme file. I skipped this check to keep the code small and easy to understand.
Q: You said that the code is pure C then what is C++ file (main.cpp) is doing there?
A: The JPEG encoder itself cannot make a working application, it processes images with correct pixel format and the images should be procured somewhere and jpeg output should be written back. These functions an application must provide. For this case C++ was more suitable.