Build issues in Qt4 with Poppler library
-
Hello,
I got some compile errors while building Qt4 project with Poppler library.
Please have look at this,
C:\Qt\examples\testPoppler/mainwindow.cpp:15: undefined reference to
_imp___ZN7Poppler8Document4loadERK7QStringRK10QByteArrayS6_' C:\Qt\examples\testPoppler/mainwindow.cpp:18: undefined reference to
_imp___ZN7Poppler8DocumentD1Ev'
C:\Qt\examples\testPoppler/mainwindow.cpp:26: undefined reference to_imp___ZN7Poppler8Document13setRenderHintENS0_10RenderHintEb' C:\Qt\examples\testPoppler/mainwindow.cpp:27: undefined reference to
_imp___ZNK7Poppler8Document8numPagesEv'
C:\Qt\examples\testPoppler/mainwindow.cpp:29: undefined reference to `_imp___ZN7Poppler8DocumentD1Ev'How can i fix this problem.
Best Regards
Ansif -
You need add the library path your profile. Please look at the following link
"here":http://qt-project.org/doc/qtcreator-2.6/creator-project-qmake-libraries.htmlThis will help you. You can also add the library manually to profile
-
[quote author="Dheerendra" date="1390010946"]You need add the library path your profile. Please look at the following link
"here":http://qt-project.org/doc/qtcreator-2.6/creator-project-qmake-libraries.htmlThis will help you. You can also add the library manually to profile[/quote]
Hello,
Thank's for your comment.
Actually i have investigated about the above problem and i got so many links related to it.
One interesting link i got here is, http://stackoverflow.com/questions/3858399/using-external-lib-dlls-in-qt-creator
Actually i was using the MingW version with gcc compiler and hence it will only compiles .a library. The above Poppler library contains a .lib file and it is being compiled by a Visual Studio compiler. I tried to compile the .lib file with gcc compiler and hence the problem occurs. Let me try this with Visual Studio compiler and may be it will fix the problem. -
oh.. got it. If library is from visual studio, our qt also has to be built using visual studio.
-
[quote author="Dheerendra" date="1390202562"]oh.. got it. If library is from visual studio, our qt also has to be built using visual studio. [/quote]
Yes.
-
Greetings!!!!!!!!!!!!!!!
Finally i succeeded to build the Qt4-Poppler library in Mingw32 compiler.
I checked the usage of Poppler library in TexWork Project and it really helps me to solve my problem.
check these link:
https://code.google.com/p/texworks/wiki/BuildingOnWindowsMinGW#Directory_structure