How to install wxWidgets

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
robertdaleweir
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Dec 20, 2017 8:18 pm

How to install wxWidgets

Post by robertdaleweir »

Hi
I downloaded wxWidget-3.0.3.tar.bz2 to my Fedora 24 distro with 'gcc-6.3.1-1.fc24' installed. I was able to compile, as a user, without any problems. I also managed to run ' make ' as a user. I then became ' root ' and ran ' make install ' which appeared to finish properly. There were a few notices ( at the end of the ' make install ') about ' ldconfig ' and ' LD_LIBRARY_PATH ', which I do not understand. Before I try to compile an app called ' waste ' and I am not sure what to do in order to make ' wxWidgets ' libraries, or whatever, available to me when I do this compile. Waste says it requires ' wxWidgets '. Can someone help me figure this out?
Robert
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: How to install wxWidgets

Post by DavidHart »

Hi,

In summary, you build against wxWidgets by telling the wx-config script to emit compilation and link instructions. As wxWidgets-3.0.3/docs/gtk/install.txt tells you (it's buried in amongst other stuff, but it is there) a simple build would look like:

Code: Select all

g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
where wx-config --cxxflags outputs the compilation information; wx-config --libs for linking.

I suggest you test-run those commands separately in a terminal. That will prove that your installation works, and also show what to expect.

BTW, like all major distros, fedora does supply official wxWidgets packages (dnf install wxGTK3-devel) so you didn't need to self-build.

Regards,

David
robertdaleweir
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Dec 20, 2017 8:18 pm

Re: How to install wxWidgets

Post by robertdaleweir »

Hi David
I have followed your suggestion and I am reading the 'install.txt' file. I will also give your command line compile a shot, in small pieces at first. I was unaware that Fedora had an install within its distro. Thank you so much, I will pursue these items.
Robert
Post Reply