0

I'm not really experienced with graphics programming, but I got curious. I installed both libgtk-3-dev and gtk-3-examples on my Debian 10.7 machine. From there I listed the example package files using dpkg-query -L gtk-3-examples to find some example programs.

In the examples directory I found the following README file:

== Building the examples ==

The examples in this directory are built alongside the rest of GTK+.

The examples under the `application[1-10]` directories are also included in
the GTK+ API reference documentation, and can be built independently, using
the system libraries, by doing:

    $ cd application1
    $ make -f Makefile.example

Looks straight forward. However, following the directions exactly yields the following result:

make: Makefile.example: No such file or directory
make: *** No rule to make target 'Makefile.example'.  Stop.

There are no "Makefile.example" files in the application folders. Running find -name "Makefile*" in the examples directory yields:

./application7/Makefile.in.gz
./application7/Makefile.am
./Makefile.in.gz
./application5/Makefile.in.gz
./application5/Makefile.am
./bp/Makefile.in.gz
./bp/Makefile.am
./application9/Makefile.in.gz
./application9/Makefile.am
./application6/Makefile.in.gz
./application6/Makefile.am
./application2/Makefile.in.gz
./application2/Makefile.am
./application10/Makefile.in.gz
./application10/Makefile.am
./application3/Makefile.in.gz
./application3/Makefile.am
./application1/Makefile.in.gz
./application1/Makefile.am
./application8/Makefile.in.gz
./application8/Makefile.am
./application4/Makefile.in.gz
./application4/Makefile.am
./Makefile.am

I've not had any luck building an example program using the above files. I'm guessing it is because of my unfamiliarity with auto tools? Is there an easy way to build an example GTK program using the above files or do I need know a lot more about make/autotools/configure to get a working example running?

Update:

The cant-run-makefile-am-what-should-i-do post is informative but does not provide a course of action when no configure, bootstrap, or autogen programs can be found within the package. The following command yields no results when executed in my examples directory: find -type f | grep -i -E "*conf*|*auto*|*boot*". I need one of those files to be provided in order to have a successful build (as far as I understand it anyway).

lonious
  • 676
  • 9
  • 25
  • 1
    Does this answer your question? [Can't run Makefile.am, what should I do?](https://stackoverflow.com/questions/4203208/cant-run-makefile-am-what-should-i-do) – tripleee Feb 21 '21 at 12:22
  • There aren't any 'configure' files that seem to be required by `autoreconf`. I'll start reading up on autotools more but I don't think I can build an example quite yet. – lonious Feb 21 '21 at 21:40

1 Answers1

0

Sorry for the fuss! I'm used to installing regular packages and missed that I needed to download the full source code to get the examples working. So, originally I mentioned that I installed both libgtk-3-dev and gtk-3-examples. I did so using apt-get install libgtk-3-dev && apt-get install gtk-3-examples.

However, to build GTK along with its examples locally it looks like what you want to do is get the source package archive with apt-get source gtk-3-examples (or similar.. I think it actually picked a different meta-package for me when I ran that command).

Then, in my new gtk+3.0-3.24.5 directory there's a nice configure binary that I can run (with subsequent make and make install commands) which produce many files including example program binaries.

So with ./gtk+3.0-3.24.5/examples/application1/exampleapp I get a running example. Voila!

example1

lonious
  • 676
  • 9
  • 25