# Is it possible to use libjpeg-turbo and OpenCV side by side?

**URL:** <https://forum.opencv.org/t/is-it-possible-to-use-libjpeg-turbo-and-opencv-side-by-side/652>\
**Category:** Uncategorized\
**Created:** [January 2, 2021, 6:53pm UTC](https://forum.opencv.org/t/is-it-possible-to-use-libjpeg-turbo-and-opencv-side-by-side/652 "2021-01-02T18:53:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NutCracker](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@NutCracker](https://forum.opencv.org/u/NutCracker)\
**Post date:** [January 2, 2021, 6:53pm UTC](https://forum.opencv.org/t/is-it-possible-to-use-libjpeg-turbo-and-opencv-side-by-side/652/1 "2021-01-02T18:53:31Z")

</div>

Hi,

I tried to use libjpeg-turbo and OpenCV side by side but then `cv::imread` fails to read an image (same problem as [here](https://stackoverflow.com/questions/59945307/cvimread-fails-in-c-project-when-we-mix-opencv-and-dlib)).

I tried building libjpeg-turbo as shared library so that there is no libjpeg.a as part of libjpeg-turbo. But then, libjpeg is missing and reading images is not possible.

Do you know of any way that I could have libjpeg-turbo and OpenCV side by side?

Thanks and regards
