[poppler] failure to link against 0.20 or 0.20.1

Fabio D'Urso fabiodurso at hotmail.it
Fri Jun 15 04:50:46 PDT 2012


On Friday, June 15, 2012 12:57:28 PM Mark Summerfield wrote:
> Hi,
Hi

> I have an app that builds fine against poppler 0.18.
> 
> But it fails against 0.20 and 0.20.1.

> It fails to link:
> g++ -m64 -Wl,-O1 -Wl,-rpath,/home/mark/opt/qt480/lib -o viewpdf mainwindow.o scrollarea.o helpform.o aboutform.o main.o moc_mainwindow.o moc_scrollarea.o moc_helpform.o moc_aboutform.o qrc_resources.o    -L/home/mark/opt/qt480/lib -lpoppler-qt4 -lenchant -Wl,-rpath -Wl,/home/mark/opt/poppler020/lib -Wl,-L/home/mark/opt/poppler020/lib -lQtGui -L/home/mark/opt/qt480/lib -L/usr/X11R6/lib64 -lQtCore -lpthread 
> mainwindow.o: In function `MainWindow::getAnnotationDetails(Poppler::Annotation*)':
> mainwindow.cpp:(.text+0x90ae): undefined reference to `Poppler::Annotation::popup() const'
> mainwindow.cpp:(.text+0x90b9): undefined reference to `Poppler::Annotation::Popup::summary() const'
> mainwindow.cpp:(.text+0x90c1): undefined reference to `Poppler::Annotation::Popup::~Popup()'
> mainwindow.cpp:(.text+0xa3c9): undefined reference to `Poppler::Annotation::Popup::~Popup()'
> collect2: ld returned 1 exit status
> make: *** [viewpdf] Error 1
It seems you're still linking against poppler 0.18 installed somewhere else

> I'm using Qt and my qmake file includes this:
> 
> LIBS	     += -lpoppler-qt4 -lenchant
> exists($(HOME)/opt/poppler020/) {
>     message(Using locally built Poppler library)
>     INCLUDEPATH += $(HOME)/opt/poppler020/include/poppler/cpp
>     INCLUDEPATH += $(HOME)/opt/poppler020/include/poppler/qt4
>     LIBS += -Wl,-rpath -Wl,$(HOME)/opt/poppler020/lib -Wl,-L$(HOME)/opt/poppler020/lib

Have you tried -L without the -Wl, prefix?
 -Wl,-L$(HOME)/opt/poppler020/lib --> -L$(HOME)/opt/poppler020/lib

Fabio

> } else {
>     exists(/usr/include/poppler/qt4) {
> 	INCLUDEPATH += /usr/include/poppler/cpp
> 	INCLUDEPATH += /usr/include/poppler/qt4
>     } else {
> 	INCLUDEPATH += /usr/local/include/poppler/cpp
> 	INCLUDEPATH += /usr/local/include/poppler/qt4
>     }
> }
>


More information about the poppler mailing list