Building wxPdfDocument with wxWidgets 3.1.0

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
rsb
I live to help wx-kind
I live to help wx-kind
Posts: 170
Joined: Fri May 29, 2015 7:26 pm

Building wxPdfDocument with wxWidgets 3.1.0

Post by rsb »

Hello,

Is the latest version of wxPdfDocument compatible with version 3.1.0 of wxWidgets.

I was able to build and link against the 3.1 libs but it's crashes on Win10 and on Linux.

Thanks.
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Building wxPdfDocument with wxWidgets 3.1.0

Post by utelle »

rsb wrote:Is the latest version of wxPdfDocument compatible with version 3.1.0 of wxWidgets.
Yes, at least the latest development version that you can download from https://github.com/utelle/wxpdfdoc/archive/master.zip. I haven't explicitly tested the release version 0.9.5 (dated December 2015) against wxWidgets 3.1, though.
rsb wrote:I was able to build and link against the 3.1 libs but it's crashes on Win10 and on Linux.
Well, this description is too generic to allow a diagnosis of the problem. Did you build the minimal sample? Does it crash? If yes, when? At which location in the code? Is any error message shown? If yes, which one?

Regards,

Ulrich
rsb
I live to help wx-kind
I live to help wx-kind
Posts: 170
Joined: Fri May 29, 2015 7:26 pm

Re: Building wxPdfDocument with wxWidgets 3.1.0

Post by rsb »

Thank you.

I'm trying to build the latest version on Linux but I'm not sure what to link our
main application against. In the previous version, We used the following lines
in our CMakeLists.txt file.

INCLUDE_DIRECTORIES(${wxmozaix_COMMON_SOURCE_DIR}/wxpdfdoc/include)
LINK_DIRECTORIES(${wxmozaix_COMMON_SOURCE_DIR}/wxpdfdoc/lib)
TARGET_LINK_LIBRARIES( wx_prj "-lwxcode_gtk2u_pdfdoc-3.0" )

I changed the above line to -lwxcode_gtk2u_pdfdoc-3.1 but I get a link error when
building our main application.

/usr/bin/ld: cannot find -lwxcode_gtk2u_pdfdoc-3.1

Not sure what I'm doing wrong or what I should be linking against.
The readme.md file doesn't help.

Thanks.
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Building wxPdfDocument with wxWidgets 3.1.0

Post by utelle »

rsb wrote:I'm trying to build the latest version on Linux but I'm not sure what to link our
main application against. In the previous version, We used the following lines
in our CMakeLists.txt file.

INCLUDE_DIRECTORIES(${wxmozaix_COMMON_SOURCE_DIR}/wxpdfdoc/include)
LINK_DIRECTORIES(${wxmozaix_COMMON_SOURCE_DIR}/wxpdfdoc/lib)
TARGET_LINK_LIBRARIES( wx_prj "-lwxcode_gtk2u_pdfdoc-3.0" )

I changed the above line to -lwxcode_gtk2u_pdfdoc-3.1 but I get a link error when
building our main application.

/usr/bin/ld: cannot find -lwxcode_gtk2u_pdfdoc-3.1

Not sure what I'm doing wrong or what I should be linking against.
The readme.md file doesn't help.
Since I don't use CMake myself, I don't know much about it. The lines quoted from your CMakeLists.txt file indicate that you are building your own application and that your application requires to link against the wxPdfDocument library.

However, you don't tell if and how you built the wxPdfDocument library. Assuming you used autoreconf, configure, and make to build it, you have to take into account that the build system was changed in the latest development version of wxPdfDocument. On Linux the resulting library is now located in the directory from which you invoked configure and make. That is, most probably you just have to change the link library location:

LINK_DIRECTORIES(${wxmozaix_COMMON_SOURCE_DIR}/wxpdfdoc/build-xxx)

where "build-xxx" is the name of the directory from which you invoked configure and make to build wxPdfDocument.

Regards,

Ulrich
rsb
I live to help wx-kind
I live to help wx-kind
Posts: 170
Joined: Fri May 29, 2015 7:26 pm

Re: Building wxPdfDocument with wxWidgets 3.1.0

Post by rsb »

Thank you, that was it.
Post Reply