2025-03-10 15:43:12 +01:00
|
|
|
README - Fast Light Tool Kit (FLTK) Version 1.5
|
|
|
|
|
------------------------------------------------
|
1998-10-06 18:21:25 +00:00
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
What is FLTK?
|
1998-10-06 18:21:25 +00:00
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
The Fast Light Tool Kit (FLTK) is a cross-platform C++ GUI toolkit
|
|
|
|
|
for UNIX®/Linux® (X11 or Wayland), Microsoft® Windows®, and macOS®.
|
2025-03-08 19:11:42 +01:00
|
|
|
FLTK provides modern GUI functionality without bloat and supports
|
|
|
|
|
3D graphics via OpenGL® and its built-in GLUT emulation.
|
|
|
|
|
It was originally developed by Mr. Bill Spitzak and is currently
|
|
|
|
|
maintained by a small group of developers across the world with
|
|
|
|
|
a central repository on GitHub.
|
2023-12-20 17:05:18 +01:00
|
|
|
|
|
|
|
|
https://www.fltk.org/
|
|
|
|
|
https://github.com/fltk/fltk/
|
1998-10-06 18:21:25 +00:00
|
|
|
|
|
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
Licensing
|
1998-10-06 18:21:25 +00:00
|
|
|
|
2023-08-15 17:52:59 +02:00
|
|
|
FLTK comes with complete free source code. FLTK is available
|
2023-12-20 17:05:18 +01:00
|
|
|
under the terms of the GNU Library General Public License with
|
|
|
|
|
exceptions (e.g. for static linking).
|
2000-11-20 14:53:52 +00:00
|
|
|
Contrary to popular belief, it can be used in commercial
|
2013-03-01 00:48:00 +00:00
|
|
|
software! (Even Bill Gates could use it.)
|
1998-10-06 18:21:25 +00:00
|
|
|
|
|
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
Online Documentation
|
1999-01-13 16:25:17 +00:00
|
|
|
|
2020-11-15 16:12:12 +01:00
|
|
|
The documentation in HTML and PDF forms can be created by
|
|
|
|
|
Doxygen from the source files. HTML and PDF versions of this
|
2025-03-10 15:43:12 +01:00
|
|
|
documentation are also available from the FLTK web site at:
|
1998-10-06 18:21:25 +00:00
|
|
|
|
2020-07-01 18:03:10 +02:00
|
|
|
https://www.fltk.org/documentation.php
|
1998-10-06 18:21:25 +00:00
|
|
|
|
|
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
Prerequisites for Building FLTK
|
1998-10-06 18:21:25 +00:00
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
To build FLTK 1.5 and higher you need:
|
|
|
|
|
|
|
|
|
|
- CMake
|
|
|
|
|
- a C++11 capable compiler, e.g. gcc, clang, Visual Studio, Xcode
|
|
|
|
|
- system specific build files (headers etc.)
|
|
|
|
|
|
|
|
|
|
CMake is used to generate the build environment on your system.
|
|
|
|
|
It can create build environments for a lot of different build tools,
|
|
|
|
|
please see the CMake documentation for more info. For details and the
|
|
|
|
|
required CMake version please see README.CMake.txt.
|
|
|
|
|
|
|
|
|
|
Since FLTK 1.5 we use C++11 features and you need at least a C++11 capable
|
|
|
|
|
compiler running in C++11 mode. The minimal C++ standard used for building
|
|
|
|
|
FLTK and your application *may* be raised in future versions.
|
|
|
|
|
|
|
|
|
|
The required header files etc. (build environment or SDK) vary across
|
|
|
|
|
platforms and are described in platform specific README.* files, e.g. on
|
|
|
|
|
Unix/Linux systems these are typically provided by the package manager.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Building and Installing FLTK With CMake (Generic Instructions)
|
|
|
|
|
|
|
|
|
|
Since FLTK 1.5 the only available build system is CMake. CMake is a
|
2025-03-08 19:11:42 +01:00
|
|
|
"build system generator" and can be used to create Makefile's, Ninja
|
|
|
|
|
build files, Xcode (macOS), Visual Studio (Windows) IDE files, and
|
2025-03-10 15:43:12 +01:00
|
|
|
many more. Use `cmake --help` or the CMake GUI tools (cmake-gui or
|
|
|
|
|
ccmake) to display the available generators on your platform.
|
2025-03-08 19:11:42 +01:00
|
|
|
|
|
|
|
|
Please see also README.CMake.txt for further details. There are *many*
|
|
|
|
|
options to configure the build as you need.
|
|
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
CMake comes in two flavors: a commandline utility and a GUI program.
|
|
|
|
|
On many platforms both can be used to generate the build files and
|
|
|
|
|
even to *build* the project (i.e. the FLTK library and programs).
|
|
|
|
|
|
|
|
|
|
The following paragraphs describe both tools in a nutshell.
|
|
|
|
|
For details please see README.CMake.txt.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Building and Installing FLTK With CMake (Commandline)
|
|
|
|
|
|
|
|
|
|
On systems where a commandline `CMake` utility is available (this is
|
|
|
|
|
the case even on Windows), the commands to build FLTK using CMake can
|
|
|
|
|
be similar to:
|
2025-03-08 19:11:42 +01:00
|
|
|
|
|
|
|
|
$ cd /path/to/fltk
|
2025-03-10 15:43:12 +01:00
|
|
|
$ cmake . -B build [ options ]
|
2025-03-08 19:11:42 +01:00
|
|
|
$ cmake --build build
|
|
|
|
|
|
|
|
|
|
These commands create the build folder 'build' inside your source tree,
|
2025-03-10 15:43:12 +01:00
|
|
|
build the library and all test programs. Note that parameters in '[ ... ]'
|
|
|
|
|
are optional and '.' represents the current directory (the source folder).
|
|
|
|
|
|
|
|
|
|
You may want to test the demo programs by running `build/bin/test/demo`.
|
|
|
|
|
|
|
|
|
|
Instead of building FLTK with a CMake command you can also use the
|
|
|
|
|
build tool you generated in the first step and/or run CMake from the
|
|
|
|
|
build directory, for instance:
|
|
|
|
|
|
|
|
|
|
$ cd /path/to/fltk
|
|
|
|
|
$ mkdir build
|
|
|
|
|
$ cd build
|
|
|
|
|
$ cmake .. -G "Unix Makefiles" [ options ]
|
|
|
|
|
$ make [ -j N ]
|
|
|
|
|
|
|
|
|
|
You may want to test the demo programs by running `bin/test/demo`.
|
2025-03-08 19:11:42 +01:00
|
|
|
|
|
|
|
|
After successful tests you may install the library with the following
|
2025-03-10 15:43:12 +01:00
|
|
|
command or a similar one, but please be aware that this will install
|
|
|
|
|
FLTK in a system directory for system-wide use if you don't change the
|
|
|
|
|
default installation path. We don't recommend this unless you know
|
2025-03-08 19:11:42 +01:00
|
|
|
what you're doing.
|
|
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
$ sudo cmake --install build # from the source tree (with CMake)
|
|
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
|
|
$ sudo make install # from the build folder (with make)
|
|
|
|
|
|
|
|
|
|
Other commands (e.g. `ninja`) may be used as well, depending on the
|
|
|
|
|
CMake generator you used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Building and Installing FLTK With CMake (GUI)
|
|
|
|
|
|
|
|
|
|
On most systems CMake comes with a GUI program called `cmake-gui`, on
|
|
|
|
|
Unix/Linux like systems also a "TUI" called `ccmake` (a "grapical" utility
|
|
|
|
|
for a terminal). The latter is out of scope for this README file.
|
2014-02-19 18:24:29 +00:00
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
If you want to use CMake's GUI program, execute it by running `cmake-gui`
|
|
|
|
|
and then follow the dialog on the screen.
|
2014-02-19 18:24:29 +00:00
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
You need to select the source folder and the build folder at the top
|
|
|
|
|
of the screen. After clicking on `Configure` CMake will prompt you to
|
|
|
|
|
select the build system or compilers of your choice. In many cases
|
|
|
|
|
you can select the default compilers, e.g Visual Studio on Windows.
|
|
|
|
|
For more details please see the CMake documentation.
|
|
|
|
|
|
|
|
|
|
Note: on Windows it may be necessary to run CMake from a "Visual Studio
|
|
|
|
|
Command Prompt" so CMake can find the existing Visual Studio compilers
|
|
|
|
|
and SDK's, but details are beyond the scope of this document.
|
|
|
|
|
|
|
|
|
|
After running `Configure` successfully (look for error messages in the
|
|
|
|
|
window) you need to click on `Generate` to create the actual build files,
|
|
|
|
|
for instance Makefiles, the Visual Studio IDE project files on Windows,
|
|
|
|
|
or the Xcode IDE project on macOS, etc..
|
|
|
|
|
|
|
|
|
|
With some CMake generators for IDE projects (VS, Xcode) you can finally
|
|
|
|
|
click on `Open Project` to launch the IDE tool of your choice. In other
|
|
|
|
|
cases you may execute the build system by running `make`, `ninja`, etc.
|
|
|
|
|
after leaving the GUI to build the library and FLTK (test) programs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Building FLTK under Microsoft Windows
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2013-03-01 00:48:00 +00:00
|
|
|
There are two ways to build FLTK under Microsoft Windows.
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2025-03-10 15:43:12 +01:00
|
|
|
The first is to use CMake to create the Visual Studio IDE project or
|
|
|
|
|
NMake files as described above, then build FLTK with Visual Studio or
|
|
|
|
|
NMake.
|
2023-12-20 17:05:18 +01:00
|
|
|
|
|
|
|
|
The second method is to use a GNU-based development tool. To build with
|
2025-03-08 19:11:42 +01:00
|
|
|
the Cygwin, MinGW, or MSYS2 tools, use CMake to create the build files
|
2025-03-10 15:43:12 +01:00
|
|
|
from the `cmake` commandline and build the library as described above.
|
|
|
|
|
On some of these systems you may also install and use `cmake-gui`.
|
2001-12-11 16:03:13 +00:00
|
|
|
|
2020-11-15 16:12:12 +01:00
|
|
|
See README.Windows.txt and README.CMake.txt for more info.
|
|
|
|
|
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2025-07-26 13:44:41 +02:00
|
|
|
Building HTML Documentation
|
2013-09-10 16:23:39 +00:00
|
|
|
|
2025-03-08 19:11:42 +01:00
|
|
|
FLTK uses Doxygen for documentation, so you'll at least need doxygen
|
2025-07-26 13:44:41 +02:00
|
|
|
installed for creating HTML docs, and additionally LaTeX for creating
|
2025-03-10 15:43:12 +01:00
|
|
|
PDF documentation.
|
2025-03-08 19:11:42 +01:00
|
|
|
|
|
|
|
|
If you want to build the documentation, change directory to your build
|
|
|
|
|
folder, for instance
|
2013-09-10 16:23:39 +00:00
|
|
|
|
2025-03-08 19:11:42 +01:00
|
|
|
cd /path/to/fltk/build
|
2013-09-10 16:23:39 +00:00
|
|
|
|
2025-03-08 19:11:42 +01:00
|
|
|
To build the HTML or PDF documentation, use these CMake commands:
|
2013-09-10 16:23:39 +00:00
|
|
|
|
2025-03-08 19:11:42 +01:00
|
|
|
cmake --build . --target html
|
|
|
|
|
cmake --build . --target pdf
|
2017-07-05 17:15:16 +00:00
|
|
|
|
2025-03-08 19:11:42 +01:00
|
|
|
Note: instead of using the generic CMake commands above you can also
|
|
|
|
|
use equivalent commands of your build system, e.g. `make html` or
|
2025-03-10 15:43:12 +01:00
|
|
|
`ninja pdf`, respectively.
|
2013-09-10 16:23:39 +00:00
|
|
|
|
|
|
|
|
|
2025-07-26 13:44:41 +02:00
|
|
|
Internet Resources
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2025-03-08 19:11:42 +01:00
|
|
|
FLTK is available on the internet in a bunch of locations:
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2025-03-08 19:11:42 +01:00
|
|
|
- https://www.fltk.org/ - homepage
|
|
|
|
|
- https://github.com/fltk/fltk - source code and discussions
|
|
|
|
|
- https://www.fltk.org/bugs.php - info for reporting bugs
|
|
|
|
|
- https://www.fltk.org/software.php - download source code
|
|
|
|
|
- https://github.com/fltk/fltk/releases - source code and documentation
|
|
|
|
|
|
|
|
|
|
Note that we don't provide pre-compiled (binary) distributions. Consult
|
|
|
|
|
the package manager of your (Linux, Unix, macOS) operating system.
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2020-11-15 16:12:12 +01:00
|
|
|
|
2025-07-26 13:44:41 +02:00
|
|
|
General Questions
|
2020-11-15 16:12:12 +01:00
|
|
|
|
2025-03-08 19:11:42 +01:00
|
|
|
To join the FLTK mailing list, go to the following web page:
|
2004-11-23 20:16:11 +00:00
|
|
|
|
2020-11-15 16:12:12 +01:00
|
|
|
https://groups.google.com/forum/#!forum/fltkgeneral
|
|
|
|
|
|
2025-07-26 13:44:41 +02:00
|
|
|
Detailed instructions on how to register for the mailing list (even
|
|
|
|
|
without a Google account) can be found further down on this page:
|
2020-11-15 16:12:12 +01:00
|
|
|
|
2020-07-01 18:03:10 +02:00
|
|
|
https://www.fltk.org/newsgroups.php
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2025-03-08 19:11:42 +01:00
|
|
|
Since July 2024 we offer GitHub Discussions on our GitHub project page.
|
|
|
|
|
Use the 'Q&A' section for general questions on building and using FLTK.
|
|
|
|
|
|
|
|
|
|
https://github.com/fltk/fltk/discussions/categories/q-a
|
|
|
|
|
|
2020-11-15 16:12:12 +01:00
|
|
|
|
2025-07-26 13:44:41 +02:00
|
|
|
Reporting Bugs
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2020-11-15 16:12:12 +01:00
|
|
|
If you are new to FLTK, or have general questions about how to use FLTK,
|
|
|
|
|
or aren't sure if you found a bug, please ask first on the fltk.general
|
|
|
|
|
group forum at:
|
2004-11-23 20:16:11 +00:00
|
|
|
|
2020-11-15 16:12:12 +01:00
|
|
|
https://groups.google.com/forum/#!forum/fltkgeneral
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2025-03-08 19:11:42 +01:00
|
|
|
or on GitHub Discussions (Q&A) as noted above:
|
|
|
|
|
|
|
|
|
|
https://github.com/fltk/fltk/discussions/categories/q-a
|
|
|
|
|
|
|
|
|
|
|
2025-07-26 13:44:41 +02:00
|
|
|
See also paragraph "General Questions" above for more info.
|
2020-11-15 16:12:12 +01:00
|
|
|
|
|
|
|
|
If you are sure you found a bug, please see the following page for
|
2025-03-08 19:11:42 +01:00
|
|
|
further information on how to report a bug:
|
2020-11-15 16:12:12 +01:00
|
|
|
|
|
|
|
|
https://www.fltk.org/bugs.php
|
1998-10-20 16:41:24 +00:00
|
|
|
|
|
|
|
|
|
2025-07-26 13:44:41 +02:00
|
|
|
Trademarks
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2025-07-26 13:44:41 +02:00
|
|
|
- Microsoft and Windows are registered trademarks of Microsoft Corporation.
|
|
|
|
|
- UNIX is a registered trademark of the X/Open Group, Inc.
|
|
|
|
|
- OpenGL is a registered trademark of Silicon Graphics, Inc.
|
|
|
|
|
- macOS is a registered trademark of Apple Computers, Inc.
|
1998-10-20 16:41:24 +00:00
|
|
|
|
|
|
|
|
|
2025-07-26 13:44:41 +02:00
|
|
|
Copyright
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2025-02-19 19:08:55 +01:00
|
|
|
FLTK is copyright 1998-2025 by Bill Spitzak and others,
|
2023-12-20 17:05:18 +01:00
|
|
|
see the CREDITS.txt file for more info.
|
1998-10-20 16:41:24 +00:00
|
|
|
|
2011-07-19 04:49:30 +00:00
|
|
|
This library is free software. Distribution and use rights are
|
|
|
|
|
outlined in the file "COPYING" which should have been included with
|
|
|
|
|
this file. If this file is missing or damaged, see the license at:
|
|
|
|
|
|
2020-07-01 18:03:10 +02:00
|
|
|
https://www.fltk.org/COPYING.php
|