text-editor.mp4
- Windows OS
- MinGW (64-bit recommended)
- Git Bash or MSYS2 (for Unix-like commands)
- CMake (for building FLTK)
- Download MinGW-w64 from: https://www.mingw-w64.org/downloads/
- Install MinGW-w64 and add
C:\mingw64\bin
to your systemPATH
. - Verify installation:
If it prints the version, MinGW is installed correctly.
g++ --version
- Download CMake from: https://cmake.org/download/
- Install and add CMake to the system
PATH
. - Verify installation:
cmake --version
- Clone the FLTK repository:
git clone https://github.com/fltk/fltk.git C:\FLTK
- Create a build directory:
mkdir C:\FLTK\build && cd C:\FLTK\build
- Run CMake to configure the build:
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
- Compile FLTK:
mingw32-make
- Verify FLTK build:
You should see
ls C:\FLTK\build\lib
libfltk.a
and other library files.
- Navigate to your project directory:
cd /d/Competative-Prog/CPP/text-editor
- Compile the program using
fltk-config
:/c/FLTK/build/fltk-config --compile editor.cxx
- Run the compiled program:
or in PowerShell:
./editor.exe
.\editor.exe
- If
fltk-config
is not found, run it with its full path:/c/FLTK/build/fltk-config --version
- If
FL/Fl.H
is missing, make sure FLTK is built correctly and include paths are set properly. - If
mingw32-make
fails, ensure MinGW is installed and in yourPATH
.
You have successfully installed FLTK and compiled an FLTK program on Windows using MinGW! π