Page 1 of 1

Building wxPdfDocument with wxWidgets 3.1.0

Posted: Thu Feb 16, 2017 8:15 pm
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.

Re: Building wxPdfDocument with wxWidgets 3.1.0

Posted: Fri Feb 17, 2017 7:37 am
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

Re: Building wxPdfDocument with wxWidgets 3.1.0

Posted: Thu Feb 23, 2017 7:17 pm
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.

Re: Building wxPdfDocument with wxWidgets 3.1.0

Posted: Thu Feb 23, 2017 8:49 pm
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

Re: Building wxPdfDocument with wxWidgets 3.1.0

Posted: Thu Feb 23, 2017 9:17 pm
by rsb
Thank you, that was it.