Error Linking WXQT

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
jimp
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Nov 10, 2006 1:28 am

Error Linking WXQT

Post by jimp »

I am trying to compile a program with the Qt version of wxWidgets (qt-unicode-3.1). The wxWidgets Qt libraries were installed from the openSUSE repository. The program compiles, links, and runs with gtk2-unicode-3.1 and gtk3-unicode-3.1.

When linking, I get the error message:
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: ./Debug/src_AboutDlg.cpp.o: undefined reference to symbol 'qt_version_tag@@Qt_5.9'

I can eliminate the error by compiling with -DQT_NO_VERSION_TAGGING. But I would rather include the missing library file.

So… how do I fix this to link without eliminating version tagging? I have searched the internet but found nothing that worked.


Here are the compile options. Some are from “wx-config --cxxflags”.
g++ -c "/home/jimp/Projects/AStyleWx/src/AboutDlg.cpp" -g -O0 -std=c++11 -Wall -fno-rtti -fno-exceptions -I/usr/lib64/wx/include/qt-unicode-3.1 -I/usr/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DwxDEBUG_LEVEL=0 -DWXUSINGDLL -D__WXQT__ -pthread -fPIC -DASTYLE_LIB -DTESTMODE1 -o ./Debug/src_AboutDlg.cpp.o -I. -I../../src -I../../dialog -I../../image -I../../../AStyle/src -I/usr/include/qt5


Here are the link options. Some are from “wx-config --libs”.
g++ -o ./Debug/astylewx @"astylewx.txt" -L. -L/usr/lib64 -pthread -lwx_qtu_adv-3.1 -lwx_qtu_aui-3.1 -lwx_qtu_core-3.1 -lwx_qtu_stc-3.1 -lwx_baseu-3.1
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Error Linking WXQT

Post by ONEEYEMAN »

Hi,
You are basically on your own with wxQt.
You can send an e-mail to wx-dev ML asking about this and hopefully either Vadim or any o the initial wxQt devs will reply. Or you can just add this option for now and see if it works.

If everything will compile - try to send the e-mail to wx-dev and see if that will be incorporated into the main wxQt port.

But if everything works with GTK+ I suggest to finish your program and then start worrying about wxQt. The port was started couple of years ago as a GSoC project but was kind of abandoned afterwards. It was pickewd up as part of wxAndroid effort, but then it was also dropped.

I think that nobody cares about wxQt much. ;-)

Thank you.
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Error Linking WXQT

Post by DavidHart »

Hi,

I've little experience with wxQt and I don't use openSUSE, so no definitive answer. However here are some thoughts of varying helpfulness.
  • -1) Why are you using wxQt? It's not exactly the wx mainstream.

    0) openSUSE supplies a various wx builds, some of which will likely conflict. Are you sure you have all the correct ones installed, and that they are being used by g++?

    1) Have you successfully built other programs against the openSUSE wxQt? In particular try some of the wxWidgets samples e.g. 'minimal' and 'widgets'. (I can't see an openSUSE package that supplies them, but the source-code does.)

    2) In my (not recently updated) Leap 15 VirtualBox guest, YAST says the wxQt packages depend on libQt 5.9.4. Is that the Qt version that your program is being built against?

    3) Must you use the openSUSE wxQt packages? Have you tried building wxQt from source, then building your program against that instead?
Regards,

David
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 550
Joined: Fri Nov 03, 2006 2:00 pm

Re: Error Linking WXQT

Post by stahta01 »

Do you have Qt version 5.9 installed?

Tim S.
User avatar
mill-j
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 02, 2018 3:21 pm

Re: Error Linking WXQT

Post by mill-j »

I manually installed Qt-5.8 via the .run file to my home folder. Then I built a shared wx against that. Then before running my app I have to export the path to the portable Qt libs, otherwise it'll try to use the installed Qt libs and start clashing.

I certainly wish more effort could be put into the port. =P~ I see it as bridge to Android/iOS. I know for a fact it runs on Haiku as I have ported some simple apps myself already, using the wxQT available from HaikuDepo and building wxQT myself.

Why? Because I Could 8)
Last edited by mill-j on Tue Aug 07, 2018 3:06 am, edited 1 time in total.
[-X Don't Complain, Change It, It's Open-Source!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Error Linking WXQT

Post by ONEEYEMAN »

Hi,
There is an old ticket about the Haiku port and wxWidgets on trac.wxwidgets.org. Do you know about it?
Now, are you saying that the Haiku port of wxWidgets is operational and it is in the usable state?

Also you can register for the trac.wxwidgets.org and leave the comments in that old ticket. I'm sure wx-devs/wx-users will be interested in the progress...

There was a GSoC effort 2-3 years ago to bring wxWidgets to Android either natively or through wxQt. There was 2 applications created based on the minimal sample and submitted to the Google store. But that effort was abandoned.

The original developers for wxQt and the guy who did the Android bridge could be found on the wx-dev/wx-users ML. You can send an E-mail there and someone will respond. But the original Android port creator is no longer available.

And of course - update the Haiku ticket. If the port is usable to some extent and someone is working on it.

Thank you.
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Error Linking WXQT

Post by catalin »

mill-j wrote:I manually installed Qt-5.8 [...] Then before running my app I have to export the path to the portable Qt libs, otherwise it'll try to use the installed Qt libs
Mind that recently QT5_CUSTOM_DIR was added for configure. Search for it in docs/qt/install.txt. It will also set the rpath for your app so you won't need to manually export the path to the custom libs.
User avatar
mill-j
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 02, 2018 3:21 pm

Re: Error Linking WXQT

Post by mill-j »

ONEEYEMAN wrote:Hi,
There is an old ticket about the Haiku port and wxWidgets on trac.wxwidgets.org. Do you know about it?
Now, are you saying that the Haiku port of wxWidgets is operational and it is in the usable state?

Also you can register for the trac.wxwidgets.org and leave the comments in that old ticket. I'm sure wx-devs/wx-users will be interested in the progress...

There was a GSoC effort 2-3 years ago to bring wxWidgets to Android either natively or through wxQt. There was 2 applications created based on the minimal sample and submitted to the Google store. But that effort was abandoned.

The original developers for wxQt and the guy who did the Android bridge could be found on the wx-dev/wx-users ML. You can send an E-mail there and someone will respond. But the original Android port creator is no longer available.

And of course - update the Haiku ticket. If the port is usable to some extent and someone is working on it.

Thank you.
Yes I remember seeing it (I think I've seen about everything wxQT :lol: ). I'd forgotten about it though. Luckily I do have a wxTrac account. While I'm not working on it myself, I want to get some patches together so anybody can build the stock 3.1.1 under Haiku so it might be awhile.

From what ive seen, wxQT under Haiku works just as good as under Linux and most of the samples are functional. Here is the package in HaikuDepot https://depot.haiku-os.org/#!/?bcguid=b ... hexpr=wxQT if you look in the actual repo you'll find the source package used to build it. Here is the guy behind it https://github.com/seandepagnier He seems to be an OpenCPN dev.

As far as Android goes, have you seen this? https://github.com/OpenCPN/OpenCPN/tree ... ildandroid it seems its working for them.

Thanks for the info.
[-X Don't Complain, Change It, It's Open-Source!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Error Linking WXQT

Post by ONEEYEMAN »

Hi,
wxWidgets is known to use a native toolkitunder any and all platforms.
I don't work under Haiku and I don't have it installed, so can't verify, but let me ask you - is Haiku have Qt/KDE as default WM? If so, it would be nice to have wxQt as a fully operational port with complete support.
And yes - if you can at least update that old Haiku ticket with the information you gave here it would be great.

As far as Android goes - like I said, there are 2 apps in the Google store. One is wxQt -> Android bridge, second is native Android/Java. But the effort was pretty much dead after the GSoC ended.
You can try to send an E-mail to wx-dev and hopefully someone will respond.

I know Stefan has a lot of effort of supporting iPhone SDK and it was recently being updated for the minimal requirements, but in terms of Android - wx is dead.

Thank you.
User avatar
mill-j
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 02, 2018 3:21 pm

Re: Error Linking WXQT

Post by mill-j »

ONEEYEMAN wrote:Hi,
wxWidgets is known to use a native toolkitunder any and all platforms.
I don't work under Haiku and I don't have it installed, so can't verify, but let me ask you - is Haiku have Qt/KDE as default WM? If so, it would be nice to have wxQt as a fully operational port with complete support.
Nope Haiku has its own DE and it doesn't use x or wayland, but someone ported Qt and a skin to match the Haiku style. While I haven't tried them yet, there are several Qt apps in the repo, such as the Otter browser.
And yes - if you can at least update that old Haiku ticket with the information you gave here it would be great.
Will do, working on patches as of right now.
[-X Don't Complain, Change It, It's Open-Source!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Error Linking WXQT

Post by ONEEYEMAN »

Hi,
So what do they use to write the application for Haiku? Do they have some kind of library for GUI development? Or they have patched GTK+/Qt?

Just curious...

And I presume the patches will be for wxQt or for the native Haiku port?
It would be nice if the person who is trying to port wx to Haiku come and join - then core wx-devs will probably be aware of the effort and help in any way they can.

Thank you.
User avatar
mill-j
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 02, 2018 3:21 pm

Re: Error Linking WXQT

Post by mill-j »

ONEEYEMAN wrote:Hi,
So what do they use to write the application for Haiku? Do they have some kind of library for GUI development? Or they have patched GTK+/Qt?
The native Haiku GUI is based on(or the same thing as) the BeOS API, see here https://www.haiku-os.org/docs/userguide/en/gui.html and http://blog.leahhanson.us/post/haiku-fi ... ogram.html

And I presume the patches will be for wxQt or for the native Haiku port?
It would be nice if the person who is trying to port wx to Haiku come and join - then core wx-devs will probably be aware of the effort and help in any way they can.

Thank you.
The patches will be for wxQT, I don't think it would be worth trying to do a port to the native Haiku API since its already so close with wxQT.

I think if the wxQT port was improved under Linux, that improvement would carry over into Haiku.
[-X Don't Complain, Change It, It's Open-Source!
Post Reply