Wxpdfdoc compilling error.

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
dkaip
Experienced Solver
Experienced Solver
Posts: 65
Joined: Wed Jan 20, 2010 1:15 pm

Wxpdfdoc compilling error.

Postby dkaip » Thu Oct 26, 2017 1:58 pm

Hello. I Linux Mint last update edition i have clone wxWidget in my personal folder ..
git clone https://github.com/wxWidgets/wxWidgets.git
and finaly compile in build-gtk folder as static and unicode lib with
../configure --enable-unicode --enable-monolithic --enable-debug --with-gtk --disable-shared --with-opengl --prefix=$(pwd)
ok i have in /home/a/wxWidgets/gtk-build/lib all libs ...
libwx_baseu-3.1.a,libwx_baseu_net-3.1.a,libwx_baseu_xml-3.1.a,libwx_gtk2u_adv-3.1.a,libwx_gtk2u_aui-3.1.a,libwx_gtk2u_core-3.1.a,libwx_gtk2u_gl-3.1.a,libwx_gtk2u_html-3.1.a,libwx_gtk2u_propgrid-3.1.a,libwx_gtk2u_qa-3.1.a,libwx_gtk2u_ribbon-3.1.a,libwx_gtk2u_richtext-3.1.a,libwx_gtk2u_stc-3.1.a,libwx_gtk2u_xrc-3.1.a,libwxjpeg-3.1.a,libwxregexu-3.1.a,libwxscintilla-3.1.a,libwxtiff-3.1.a
and in wx/ folder the headers
So every project compiler options are
`/home/a/wxWidgets/gtk-build/wx-config --cflags` and for linker `/home/a/wxWidgets/gtk-build/wx-config --libs all`

Ok after now. Now i have clone wxpdsdoc
With autoreconf construct configure
With mkdir build-gtk and cd build-gtk i must make libs.
So i must use ../configure --enable-static --with-wx-config="/home/a/wxWidgets/gtk-build/wx-config" for use of already static libs of wxwidgets and to make static lib i use --enable-static.
Then with make CXXFLAGS="-std=c++11" must take static libs.

But i am taking
*** static library /home/a/wxWidgets/gtk-build/lib/libwx_baseu-3.1.a is not portable!
/usr/bin/ld: /home/a/wxWidgets/gtk-build/lib/libwx_gtk2u_core-3.1.a(corelib_event.o): relocation R_X86_64_32 against `_ZN14wxCommandEvent12ms_classInfoE' can not be used when making a shared object; recompile with -fPIC
/home/a/wxWidgets/gtk-build/lib/libwx_gtk2u_core-3.1.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [libwxcode_gtk2u_pdfdoc-3.1.la] Error 1


What i must do? What i am doing wrong?

dkaip
Experienced Solver
Experienced Solver
Posts: 65
Joined: Wed Jan 20, 2010 1:15 pm

Re: Wxpdfdoc compilling error.

Postby dkaip » Fri Oct 27, 2017 1:47 pm

I think that the solution is ...

Code: Select all

../configure  --disable-shared --enable-static    --with-wx-config="/home/a/wxWidgets/gtk-build/wx-config"  --prefix=$(pwd)  --with-pic
make CXXFLAGS="-std=c++11" WX_CONFIG="/home/a/wxWidgets/gtk-build/wx-config --cflags"  LIBS="/home/a/wxWidgets/gtk-build/wx-config  --libs all"

That produce the ..
/home/a/wxpdfdoc/build-gtk/libwxcode_gtk2u_pdfdoc-3.1.la

library. But how must use lib? And i dont see header files inside build-gtk dir.

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

Re: Wxpdfdoc compilling error.

Postby utelle » Sat Oct 28, 2017 7:42 am

dkaip wrote:... But how must use lib? And i dont see header files inside build-gtk dir.

Since the header files are independent of the actual build, they are not copied to the build directory. Just add a compiler flag pointing to the include subfolder of the wxPdfDocument distribution, i.e. something like

Code: Select all

-I$(wxpdfdoc_topdir)/include

where $(wxpdfdoc_topdir) is a place holder for the directory into which you copied the wxPdfDocument distribution.

Regards,

Ulrich

dkaip
Experienced Solver
Experienced Solver
Posts: 65
Joined: Wed Jan 20, 2010 1:15 pm

Re: Wxpdfdoc compilling error.

Postby dkaip » Sat Oct 28, 2017 4:01 pm

Ok, i did that and all are ok now. As i can see there secret folder .libs at folder build-gtk and inside ...

/home/a/wxpdfdoc/build-gtk/.libs/libwxcode_gtk2u_pdfdoc-3.0.a
/home/a/wxpdfdoc/build-gtk/.libs/libwxcode_gtk2u_pdfdoc-3.0.la
/home/a/wxpdfdoc/build-gtk/.libs/libwxcode_gtk2u_pdfdoc-3.0.lai
/home/a/wxpdfdoc/build-gtk/.libs/libwxcode_gtk2u_pdfdoc-3.0.so
/home/a/wxpdfdoc/build-gtk/.libs/libwxcode_gtk2u_pdfdoc-3.0.so.0
/home/a/wxpdfdoc/build-gtk/.libs/libwxcode_gtk2u_pdfdoc-3.0.so.0.0.0
/home/a/wxpdfdoc/build-gtk/.libs/libwxcode_gtk2u_pdfdoc-3.1.a
/home/a/wxpdfdoc/build-gtk/.libs/libwxcode_gtk2u_pdfdoc-3.1.la
/home/a/wxpdfdoc/build-gtk/.libs/libwxcode_gtk2u_pdfdoc-3.1.lai


Now i am truing to find examples of code to study.
Thanks
Jim


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 1 guest