Skip to content

Latest commit

 

History

History
120 lines (67 loc) · 2.83 KB

File metadata and controls

120 lines (67 loc) · 2.83 KB

 

 

 

 

 

 

Link error.

 

 

 

 

 

Full error message

 


/MyFolder/main.cpp:5: error: undefined reference to 'Poppler::Document::load(QString const&, QByteArray const&, QByteArray const&)'

 

 

 

 

 

 

Cause

 

IDE: Qt Creator 2.0.0

Project type: Qt4 Console Application

Selected required modules: QtCore

Compiler: G++ 4.4.1

 

The following source code was used:

 


#include <poppler/qt4/poppler-qt4.h> int main() {   const Poppler::Document * const doc     = Poppler::Document::load("test.pdf"); }

 

The following project file was used:

 


#------------------------------------------------- # # Project created by QtCreator 2010-09-18T12:40:50 # #------------------------------------------------- QT += core gui TARGET = CppGraphExample4 TEMPLATE = app SOURCES += main.cpp\ dialogmain.cpp HEADERS += dialogmain.h FORMS += dialogmain.ui

 

 

 

 

 

Solution

 

You need to link against the Poppler library. Add the following line to your project file:

 


LIBS += -L/usr/local/lib -lpoppler-qt4