1

I'm trying to test a C program to access to webcam and make a snapshot, I found this code https://gist.github.com/bellbind/6813905

I built it using

 gcc -std=c99 capture.c -ljpeg -o capture

but the following error occurs

Wrong JPEG library version: library is 80, caller expects 62

I'm using ubuntu 14.10 Any idea how to solve this problem ?

Amed
  • 57
  • 1
  • 7

2 Answers2

1

This solved by installing libjpeg62-dev

sudo apt-get install libjpeg62-dev
Amed
  • 57
  • 1
  • 7
0

I had a similar issue I was able to solve by setting the desired JPEG version in a config file located in /usr/include/jconfig.h in my Ubuntu 18.04 install. I simply set the value of JPEG_VERSION. it was 62, and I set it to 80. I then had no trouble building my project and linking the correct version. Note that this file is auto generated by another CMake configuration file, so it is kind of a hack, and not the permanent solution.

Bohao LI
  • 2,123
  • 2
  • 18
  • 24