Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fltk/fltk/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
FLTK 1.5 supports macOS 10.7 Lion and later. As of February 2026, FLTK compiles and runs on macOS 26 Tahoe for both:- Intel (x86_64) processors
- Apple Silicon (arm64) processors
- Xcode IDE - Visual development with Apple’s IDE
- Command-line tools - Terminal-based builds with make
Build with Xcode
Prerequisites
Install Xcode
Download Xcode from the Mac App Store.Requirements:
- Apple ID
- Administrator password
- Installation time: 1+ hours
- Disk space: 10+ GB
Install CMake
Download CMake from cmake.org/download.
- Download the
.dmgfile for macOS - Open the disk image
- Drag CMake to Applications folder
Download FLTK Source
- Via Xcode
- Via Command Line
- Via Tarball
Use Xcode’s built-in Git support:
- Launch Xcode
- Select Source Control > Clone…
- Search for
fltk/fltk - Select the
fltkrepository owned byfltk - Click Clone
- Navigate to your home directory
- Create a new folder:
dev - Save as:
fltk-1.5 - Click Clone, then Done
- Load the project in Xcode
- Select Source Control > Pull…
Configure with CMake
- Launch CMake (press ⌘ + Spacebar, type “CMake”, press Enter)
-
Set source directory:
- Click Browse Source…
- Navigate to
/Users/your_name/dev/fltk-1.5 - Click Open
-
Set build directory:
- Click Browse Build…
- Navigate to
/Users/your_name/dev/fltk-1.5 - Create folder:
build - Inside
build, create folder:Xcode - Click Open
- Click Configure
- Select Xcode as the generator
- Click Done
-
Review options in the CMake list:
- Expand FLTK section for FLTK-specific options
- Expand CMAKE section for general build options
- Bundled image libraries are built by default
- Click Generate
- Click Open Project to launch Xcode
CMake generates Xcode projects dynamically, ensuring compatibility with your macOS version and Xcode installation.
Build in Xcode
- When Xcode opens, allow it to Autocreate Schemes
-
Select a test program:
- Choose
helloor another program from the Scheme menu - Press ⌘ + R to compile and run
- Choose
-
To build all of FLTK:
- Select the
ALL_BUILDscheme - Press ⌘ + B to build
- Select the
-
To run the demo:
- Select the
demoscheme - Press ⌘ + R to run
- Select the
Building
demo does not automatically build other test programs. This is intentional for incremental builds.Build Your Applications
SeeREADME.CMake.txt in the FLTK source directory for details on creating Xcode projects for your own applications.
Build with Command Line
Prerequisites
Install CMake
Download from cmake.org/download and install to Applications.Add CMake to your PATH:Or use CMake’s menu: Tools > How to Install for Command Line Use
Download FLTK Source
See Download FLTK Source above for options.Configure and Build
In Terminal, navigate to your FLTK source directory:Configuration Options
Common CMake options:Testing
Run the demo application:Installing
Install to/usr/local (requires sudo):
Building Your Applications
Usefltk-config to compile applications:
/usr/local/bin to your PATH:
~/.zshrc or ~/.bash_profile to make it permanent.
macOS-Specific Features
Application Bundles
FLTK automatically creates macOS application bundles (.app directories) for GUI programs. These bundles:
- Contain the executable and resources
- Display properly in Finder
- Can be launched by double-clicking
- Support drag-and-drop file opening
Menu Bar Integration
FLTK applications integrate with the macOS menu bar:- Menu items appear in the system menu bar
- Standard macOS shortcuts work automatically
- About, Preferences, and Quit are in the app menu
Retina Display Support
FLTK automatically supports Retina displays with high-DPI rendering.Dark Mode Support
FLTK respects the system’s Dark Mode setting.File Drag-and-Drop
Make your application respond to files dropped on its icon:Create Info.plist
Create an Use multiple array items for multiple extensions.
Info.plist file based on test/mac-resources/editor.plist:Troubleshooting
Ranlib Warnings
You may see warnings about missing symbols:Xcode Version
Ensure you’re using a recent version of Xcode. FLTK requires Xcode 9.0 or later.CMake Not Found
Ifcmake command is not found:
Permission Denied
If installation fails with permission errors, usesudo or install to a user directory: