I am using Libjpeg version 6b. In version 8 they have a nice function to read data out of the memory called jpeg_mem_src(...), unfortunately ver. 6b does not ha
jpeg_mem_src(...)
Answering to poor s093294 who has been waiting for an answer for more than a year. I can't comment, so creating a new answer is the only way.
ERREXIT is a macro in libjpeg. Include jerror.h and you're all set.