Starting /MyProject... /MyProject: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory /MyProject exited with code 127
Operating system: Ubuntu 10.04 LTS Lucid Lynx
IDE: Qt Creator 1.3.1
Project type: Qt4 Console Application
Selected required modules: QtCore
Boost version: 1.42.0
Additional libraries: jpeg-8a from the Independent JPEG Group
The following source code was used:
#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); }
The following project file was used:
#------------------------------------------------- # # Project created by QtCreator 2010-05-02T08:31:54 # #------------------------------------------------- QT -= gui TARGET = MyProject CONFIG += console CONFIG -= app_bundle INCLUDEPATH += ../../../boost_1_42_0 ../../../jpeg-8a TEMPLATE = app SOURCES += main.cpp LIBS += -L/usr/local/lib -ljpeg
(Murat Karaöz contacted me to notify me of the solution. Thanks Murat!)
The solution (from Stack Overflow):
A quick fix is to add the directory that contains libjpeg.so.8 to your /etc/ld.so.conf file, and then run ldconfig