Undefined reference to wxRibbon components

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
xR4yd
In need of some credit
In need of some credit
Posts: 1
Joined: Thu Aug 15, 2019 4:24 am

Undefined reference to wxRibbon components

Post by xR4yd » Mon Aug 19, 2019 5:25 am

I was developing a GUI-App but when I started using wxRibbon I was getting undefined references to wxRibbon component member functions. As a compiler I am using g++ 7.4.0 on Ubuntu 18.04. What is weird is that the declarations of the ribbon components don't produce any errors, just the member functions! To check that it wasn't because of my code I loaded up the 'Ribbon' sample provided by wxWidgets. It worked using the provided make-file with cmake (which internally uses g++ because that's the only compiler I have installed) but with my compile command I got the same errors. Here it is:
g++ src/*.cpp `wx-config --cxxflags --libs std --static` -o target/debug/main
Am I using gcc in a wrong way? Any help would be greatly appreciated!

User avatar
doublemax
Moderator
Moderator
Posts: 13985
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Undefined reference to wxRibbon components

Post by doublemax » Mon Aug 19, 2019 8:29 am

I work under Windows only, so i don't know too much about wx-config, but try experimenting with different parameters for "wx-config --libs", e.g. "wx-config --libs all". The ribbon component lives in its own library, i guess it's not included in the standard libs.
Use the source, Luke!

Post Reply