Hi All,
I am using Xubuntu 18.04 and have been able to compile wxwidgets apps without problems until I tried to use wxMediaCtrl.
I have the following ubuntu wx packages installed:
libwxgtk-media3.0-gtk3-0v5:amd64
libwxgtk3.0-0v5:amd64
libwxgtk3.0-dev
libwxgtk3.0-gtk3-0v5:amd64
wx-config --list gives the following output:
Default config is gtk2-unicode-3.0
Default config will be used for output
Alternate matches:
base-unicode-3.0
wx-config --help shows:
Available libraries in this build are:
xrc stc richtext ribbon propgrid aui gl media html qa adv core xml net base
I have tried changing the makefile to use `wx-config --libs core,media` but linking always fails with
cannot find -lwx_gtk2u_media-3.0 - I even tried linking with the ubuntu gtk3-media package but compile failed.
How do I correct this problem? I don't mind compiling wxwidgets from source but what configure options would I need to use gtk3 and have the present range of options that I have now?
Cheers
Cannot compile with wxMediaCtrl - linker errors
-
- In need of some credit
- Posts: 8
- Joined: Mon May 21, 2018 6:58 am
Re: Cannot compile with wxMediaCtrl - linker errors
Hi,
or alternatively wx-config --libs all
If those still fail to link, what is the output of doing, in a terminal:
wx-config --libs all
Regards,
David
That should be wx-config --libs std,mediaI have tried changing the makefile to use wx-config --libs core,media
or alternatively wx-config --libs all
If those still fail to link, what is the output of doing, in a terminal:
wx-config --libs all
Regards,
David
-
- In need of some credit
- Posts: 8
- Joined: Mon May 21, 2018 6:58 am
Re: Cannot compile with wxMediaCtrl - linker errors
Thanks David,
wx-config libs all :
-L/usr/lib/x86_64-linux-gnu -pthread -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_stc-3.0 -lwx_gtk2u_richtext-3.0 -lwx_gtk2u_ribbon-3.0 -lwx_gtk2u_propgrid-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_gl-3.0 -lwx_gtk2u_media-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0
It looks like the ubuntu libs are compiled against gtk2, not sure why they have the media package if it won't work?
Any ideas? Do I need to compile wxwidgets with gtk3? If so, is there a guide for the best configure options?
wx-config libs all :
-L/usr/lib/x86_64-linux-gnu -pthread -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_stc-3.0 -lwx_gtk2u_richtext-3.0 -lwx_gtk2u_ribbon-3.0 -lwx_gtk2u_propgrid-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_gl-3.0 -lwx_gtk2u_media-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0
It looks like the ubuntu libs are compiled against gtk2, not sure why they have the media package if it won't work?
Any ideas? Do I need to compile wxwidgets with gtk3? If so, is there a guide for the best configure options?
Re: Cannot compile with wxMediaCtrl - linker errors
Did you try putting wx-config libs all in your makefile? Did that still fail? If so, what happens if you try to build your app from the commandline, using something like:wx-config libs all: ... -lwx_gtk2u_media-3.0
g++ *.cpp $(wx-config --cxxflags --libs all) -o appname
No, not unless you particularly want a gtk3 build. Or does your makefile need a wx gtk3 for some reason? (If so, fix it. )Do I need to compile wxwidgets with gtk3
If so, is there a guide for the best configure options?
Code: Select all
mkdir builddir && cd builddir && ../configure --with-gtk=3 --enable-mediactrl --prefix=$(pwd) && make -j
-
- In need of some credit
- Posts: 8
- Joined: Mon May 21, 2018 6:58 am
Re: Cannot compile with wxMediaCtrl - linker errors [SOLVED]
Hi,
The linking problem was due to a missing package (top one below), that provided libwx_gtk2u_media-3.0:
libwxgtk-media3.0-0v5:amd64 (gtk2)
libwxgtk-media3.0-gtk3-0v5:amd64 (gtk3)
However, that package had a missing symlink (libwx_gtk2u_media-3.0.so) which I created manually - after that and using wx-config --libs std,media the program compiled without problems.
Thanks for your help.
The linking problem was due to a missing package (top one below), that provided libwx_gtk2u_media-3.0:
libwxgtk-media3.0-0v5:amd64 (gtk2)
libwxgtk-media3.0-gtk3-0v5:amd64 (gtk3)
However, that package had a missing symlink (libwx_gtk2u_media-3.0.so) which I created manually - after that and using wx-config --libs std,media the program compiled without problems.
Thanks for your help.
Re: Cannot compile with wxMediaCtrl - linker errors
Hi,
You should post to the Ubuntu forum or send an E-mail to their ML complaining about this (missing symlink).
Because if you software will be distributed to the customers they will start complaining to you.
Thank you.
You should post to the Ubuntu forum or send an E-mail to their ML complaining about this (missing symlink).
Because if you software will be distributed to the customers they will start complaining to you.
Thank you.
Re: Cannot compile with wxMediaCtrl - linker errors
I think you'll find it was missing only because libwxgtk-media3.0-dev was not installed; something I should have noticed from the first post .You should post to the Ubuntu forum or send an E-mail to their ML complaining about this (missing symlink).