9
#include <boost/gil/gil_all.hpp>
#include <boost/gil/extension/io/jpeg_io.hpp>

int main()
{
  using namespace boost::gil;
  rgb8_image_t img;
  jpeg_read_image("test.jpg",img);
}

I included $BOOST_ROOT to VS 2010 project properties -> C/C++ -> General -> Additional Include Directories.

same error is defined in http://www.richelbilderbeek.nl/CppCompileErrorJpeglibHnoSuchFileOrDirectory.htm but declared solution did not resolve my problem.

manlio
  • 18,345
  • 14
  • 76
  • 126
orko
  • 91
  • 1
  • 1
  • 2
  • 1
    You need to install a [JPEG library](http://www.ijg.org/). – Some programmer dude May 29 '13 at 15:24
  • hi @JoachimPileborg i couldn't figure out how to install to make it work with gil. Can you explain it? – orko May 29 '13 at 16:20
  • i built jpeg library for vs 2010 by following instructions in .txt. now i get error LNK2001: unresolved external symbol _jpeg_start_decompress errors – orko May 29 '13 at 16:53
  • http://www.dbuggr.com/andrew8062/compile-ijg-jpeg-library-libjpeg-visual-studio-2010/ – orko May 29 '13 at 16:56
  • vs setup include directory C:\libraries\jpeg-9 lib directory C:\libraries\jpeg-9\Release – orko May 29 '13 at 16:56

3 Answers3

26

the jpeg library is missing perhaps?

sudo apt-get install libjpeg-dev

^that solved my problem

Bach
  • 6,145
  • 7
  • 36
  • 61
Mazen Fakih
  • 261
  • 3
  • 3
1

sudo dnf install libjpeg-turbo-devel on fedora.

0

Install or bind a library with standard JPEG compatible API:

  • JPEG
  • JPEG-turbo
  • MozJPEG
  • etc

Here is an example: https://github.com/ohhmm/generator/blob/741e9921c6c7083d7126fb018d941939d60a6612/picture-pattern-generate/CMakeLists.txt#L5

Sergei Krivonos
  • 4,217
  • 3
  • 39
  • 54