compiling the widgets sample on ubuntu 16.04

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
wxbolo
In need of some credit
In need of some credit
Posts: 8
Joined: Sat Jul 22, 2017 7:19 pm

compiling the widgets sample on ubuntu 16.04

Post by wxbolo »

Hi,

I am trying to compile the widgets example from the wxWidgets-master/samples/ directory using the makefile for unx systems on ubuntu 16.04. At first it was missing the gtk/gtk.h file for which then I made a link in the folder usr/include. After that it was missing the gdk.h file which then has been solved with a new link to gtk-2.0/gdk.h. After this then it is missing the gio/gio.h file. I am not sure how many files will be missing and I am wondering whether I have done something wrong. I have installed the libgtk2-dev package which provided the above mentioned files. What am I missing?

Thanks
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: compiling the widgets sample on ubuntu 16.04

Post by ONEEYEMAN »

Hi,
You don't need to create any link to any files.
Since you wrote you are trying to compile the sample from the Git HEAD, I presume you did cloned the repository and compiled the library.

Which configure options did you use? Did configure gave you any errors? Did you get any errors during make?

Or you installed the wxGTK from the Ubuntu repository and now trying to compile the sample from the HEAD?

Please explain you situation.

Thank you.
wxbolo
In need of some credit
In need of some credit
Posts: 8
Joined: Sat Jul 22, 2017 7:19 pm

Re: compiling the widgets sample on ubuntu 16.04

Post by wxbolo »

Hi,

Thanks for your reply! So far I have downloaded the examples from git then hit ./configure (no error message) after that I types make and then sudo make install. All run without error. After that I entered the samples widgets library and run make -f makefile.unx. The error messages started to appear. I am not sure at this point why certain samples build and others dont. Do I have to set the library path after the make install step?

Thanks again
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: compiling the widgets sample on ubuntu 16.04

Post by DavidHart »

Hi,

makefile.unx isn't the one to use.

What you should have done is to build in a subdir:
mkdir build-dir && cd build-dir
../configure --<whatever>
make -j

There would then be a samples/ dir inside build-dir that will have a properly-configured 'Makefile'. as will each of the samples/foo/

I suggest you do the above now, but I don't think you need to run make to build wx again; just configuring (with the same options as you originally used) should be enough. Each sample will build and run against your installed wx.

Regards,

David
wxbolo
In need of some credit
In need of some credit
Posts: 8
Joined: Sat Jul 22, 2017 7:19 pm

Re: compiling the widgets sample on ubuntu 16.04

Post by wxbolo »

HI,

Thanks, I did as instructed and run ../configure, make, make install from the build library and then used the Makefile in the samples folder in the build. It built without error.

Thanks
Post Reply