Results 1 to 3 of 3

Thread: Trouble using Poppler libs with QT Creator on Mac

  1. #1
    Join Date
    Jul 2011
    Qt products
    Qt3 Qt4
    MacOS X Unix/X11 Windows

    Default Trouble using Poppler libs with QT Creator on Mac

    Hi Guys,

    I am having some trouble with using the Poppler libs(for PDF rendering) with my QT Creator project in Mac 10.6.8.

    I downloaded the poppler source and configured things with the help of cmake. Then I ran "make install" to install the poppler libraries. In my QT Creator
    project I have the below lines as code :

    QString test("/Users/***/Desktop/WhiteBox.pdf");
    Poppler:ocument* temp =Poppler:ocument::load(test);

    below is the error I get while compiling:

    Undefined symbols for architecture x86_64:
    "Poppler:ocument::load(QString const&, QByteArray const&, QByteArray const&)", referenced from:
    MainWindow::MainWindow(QWidget*)in mainwindow.o
    ld: symbol(s) not found for architecture x86_64
    make: Leaving directory `/Users/****/PDFRenderExample-build-desktop'
    collect2: ld returned 1 exit status
    make: *** [] Error 1
    The process "/usr/bin/make" exited with code 2.
    Error while building project PDFRenderExample (target: Desktop)
    When executing build step 'Make'

    It would be really helpful if someone could point out the mistake I am doing and advice me with a solution for the same.

    Thanks in advance!!!

  2. #2
    Join Date
    Jan 2006
    Munich, Germany
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows

    Default Re: Trouble using Poppler libs with QT Creator on Mac

    Undefined symbols for architecture x86_64:
    Are you on a 32bit or 64bit machine?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jul 2011
    Qt products
    MacOS X Unix/X11 Windows

    Default Re: Trouble using Poppler libs with QT Creator on Mac

    Hi, I think I have the same problem with you. When I try to link the poppler in macport, I keeps getting the error. And I don't think it is really the architecture problem, because all macports librarys are compiled from source and uses the x64 version compiler.

    So I tried to compile poppler step by step, I use macport to install all the dependencies need by poppler.
    However, for poppler itself, I don't use macport, I downloaded the newest version. and cmake it.
    When cmaking there is also x86_64 problem in making the cxx wrapper. It is caused by the iconv library on mac.
    By default It uses the iconv in /usr/lib, for some reason the native libiconv on mac has something wrong. (If you google it you will see people trying to compile PHP but also fail on the iconv lib).
    So I modify the FindIconv.cmake file to use the iconv located under /opt/local/lib.
    And that works out.

    I think it is because when installing poppler from macport there is no problem because macport uses the its own iconv.
    But when creating a project to link poppler in Qt creator, it will by default use the iconv in /usr/lib. That's why it fails to work.

    Hope this is useful to you.

    One thing to add is that don't try to replace the system native iconv. It seems that some people did it and nothing happens.
    But I tried to do that, and my lion stuck at the startup screen, I have to reinstall the system.

Similar Threads

  1. Qurl+poppler
    By wakitowaki in forum Qt Programming
    Replies: 1
    Last Post: 15th June 2011, 20:39
  2. Poppler
    By maider in forum General Programming
    Replies: 1
    Last Post: 13th July 2010, 20:13
  3. Poppler for windows
    By maider in forum Installation and Deployment
    Replies: 0
    Last Post: 11th March 2010, 12:01
  4. Qt Creator debugging trouble on Mac OS
    By johnmidd in forum Qt Tools
    Replies: 5
    Last Post: 6th November 2009, 13:34
  5. QT Creator - Creating and Using LIBS
    By floyd.pepper in forum Newbie
    Replies: 7
    Last Post: 22nd July 2009, 22:46

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.