wxWidgets installation


11 posts
by cbegg50 » Wed Jun 20, 2012 10:43 pm
I'm trying to compile a program that requires wxWidgets. I've downloaded the wdWidgets source, but it requires X11 includes and libraries which I can't find. How can this be if Raspberry Pi uses X11 (startx). Where can I get the X11 libraries used and the relevant include files?

Regards,
Colin Begg
Posts: 15
Joined: Sat Jun 16, 2012 10:32 pm
by Alec » Wed Jun 27, 2012 9:48 am
Hmm, I expect to want to explore this later myself. Perhaps later/other OS pi distros will come w/ the requrired headers, and libraries compiled for the platform. As for the startx question, could the answer be that that that the xinit program that the startx script invokes is built without needing all of the libs required for wxWidgets? And/or these are used statically linked?

If you don't get any joy here or on another forum on this site, it might be, of course be worth asking on the wxWidgets users' ML. (wx-users)

Good Luck.
Posts: 20
Joined: Sat Jan 14, 2012 8:18 pm
by cbegg50 » Wed Jun 27, 2012 11:18 am
Hi,
Upon further investigation, I have found the libraries and includes in extended library paths and include paths like /usr/lib/arm-linux-gnueabi, but there's is a sub-folder called pkgconfig, which contains some .pc files as required for compilation of wxWidgets and other programs requiring glib, pango, atk or GTK, but only a few of these .pc files are actually in the folder.

I have posted separately about these missing .pc files, but essentially the distro is missing some files required to make use (in newly compiled programs) of these libraries. I'm attempting to generate the required files from Gnome project sources, then copy them to the distro's pkgconfig folder and I'll report here on my success/failure and include any working files I create.

Regards,
Colin Begg
Posts: 15
Joined: Sat Jun 16, 2012 10:32 pm
by molton » Thu Jan 03, 2013 4:14 am
Hello, I'm interested in buying Raspberry Pi's for some projects I have in mind, but I would have to be able to use wxWidgets on the Raspberry Pi, has anyone had any luck with getting wxwidgets to work? What OS did you try Cbegg?
Posts: 8
Joined: Thu Jan 03, 2013 4:09 am
by NormanDunbar » Mon Jan 07, 2013 8:46 am
molton wrote:Hello, I'm interested in buying Raspberry Pi's for some projects I have in mind, but I would have to be able to use wxWidgets on the Raspberry Pi, has anyone had any luck with getting wxwidgets to work? What OS did you try Cbegg?


I have wxWidgets running on my Pi using wxPython. As far as I remember, I did this:

sudo apt-get update
sudo apt-get install python-wxgtk2.8 python-wxglade

I use wxGlade to design my GUIs.

The dependencies for python-wxgtk2.8 should bring in all you need.

HTH

Cheers,
Norm.
Why do they put lightning conductors on churches?
User avatar
Posts: 73
Joined: Wed Nov 23, 2011 12:13 pm
Location: Leeds, West Yorkshire, England.
by molton » Mon Jan 07, 2013 2:29 pm
Thanks Norman, what OS do you use on that Raspberry Pi?
Posts: 8
Joined: Thu Jan 03, 2013 4:09 am
by NormanDunbar » Mon Jan 07, 2013 8:28 pm
Evening.

I'm using Raspbian. It's currently the only one using hardwarefloating point rather than software. Plus, I much prefer it to Fedora and/or Arch. I tried all of them and settled on Raspbian.

Cheers,
Norm.
Why do they put lightning conductors on churches?
User avatar
Posts: 73
Joined: Wed Nov 23, 2011 12:13 pm
Location: Leeds, West Yorkshire, England.
by ghans » Mon Jan 07, 2013 9:42 pm
Could it be that OP is just missing the development
versions of the packages ? I.E. the "-dev" ones ?


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4462
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by molton » Tue Jan 08, 2013 10:30 am
Thanks again Norman. It could be that OP just didn't get it working, but I know I'm putting that Raspian on my Raspberry Pi when I get one because of this thread. I'm interested in putting my program Lightput onto Raspberry Pi computers to make animated dichroic glass artwork and a Raspberry PI is so small the computer could be integrated into the art piece.
Posts: 8
Joined: Thu Jan 03, 2013 4:09 am
by molton » Tue Feb 05, 2013 12:21 pm
fyi, I guess because the X-11 implementation in the Raspbian is slow right now (I heard that somewhere) wxWidgets apps run kinda slow on the Raspberry Pi, but they work. One thing I noticed is code dealing with the file system had to be changed around to work right for some reason, I had to use the wxStandardPaths.GetExecutablePath()
Posts: 8
Joined: Thu Jan 03, 2013 4:09 am
by Alec » Wed Feb 20, 2013 6:36 pm
Sorry, I should have posted back my success in building wxWidgets 2.9.4 on the last version of Raspbian. I followed pretty much the procedure below; and I've started again w/ the current Raspbian (13-02-09). (I say pretty much, because I'm not certain of the libs/version numbers that I used before.)

I installed: - build-essential
- libgtk2.0-dev
- libgnomeprintui2.2-dev

Then, (w/ unnecessary sudo)

cd /home/pi/wxWidgets-2.9.4
sudo mkdir build
cd build
sudo ../configure
sudo make
cd samples/minimal
sudo make
./minimal

the minimal, and a few other samples that I tried all worked fine.

The basic build of wxWidgets took ~5.5hr tho. ;-(

A couple of related points: I've started threads on the C/C++ fora on speeding up build perfromance using g++; and on-cross compilation options.

Also, IIRC, Raspbian comes w/ wxGTK in the repo but this is the (now ancient) 2.8.0 version.

So far I've not built any demanding wxWidgets apps, on the Pi - and certainly none that would stretch the real-time or graphics capabilities.
Posts: 20
Joined: Sat Jan 14, 2012 8:18 pm