Just putting this here for future reference..
1. Started with https://www.msys2.org/ [. . .]
2. Open a mingw64 shell window from DOS, [. . .]
3. Inside the new shell that opens, get the latest updates [. . .]
4. The above step may close the shell window you opened [so . . .]
5. Now install man, vim, the 64bit compiler, make, man, and cmake [. . .]
6. With this installed, one should be able to run cmake to build fltk [. . .]
My legacy library doesn't use FLTK but to check that I could build it
under both Windows / Visual Studio, and MinGW / gcc I took a slightly
different route to Greg, and what I found was the following:
1. I already had git installed on the PC, which gives a git-bash shell window, with vi, etc :-)
2. I had to install a licensed copy of Visual Studio 2017 as the free trial period had expired :-(
3. I downloaded the Windows binaries for CMake
4. To build for Visual Studio:
a. Launch the CMake GUI from the Start Menu
b. Select the folder containing the top level CMakeLists.txt
c. Create and select a build directory
d. Click on Configure and select the Visual Studio generator [first time only]
e. Click on Generate to create a project.sln file in the build directory
f. Open the project.sln file with Visual Studio and away you go
For the MinGW / gcc version replace the Visual Studio step with those below:
5. I downloaded the WIndows binaries for doxygen
6. I downloaded the Windows binaries for graphviz
7. I downloaded the MinGW-64 installer [simpler and more up-to-date than mingw?]
8. To build for MinGW / Makefile / gcc:
a. Launch the CMake GUI from the Start Menu
b. Select the folder containing the top level CMakeLists.txt
c. Create and select a build directory
d. Click on Configure and select the MinGW makefile generator [first time only]
e. Click on Generate to create a Makefile in the build directory
9. Start a MinGW command window using C:\MinGW\bin\open_distro_window.bat
a. add graphviz directory to %PATH%
b. cd into the build directory
c. type "make" to build default target(s) - type "make help" to see all targets
d. Adjust options using the CMake-gui if needed, rinse and repeat
I imagine that building FLTK itself would work in the same way, but I haven't tried.
D.
PS: I had difficulty when searching the web to find out which of the msys/mingw
articles were still relevant and up to date. Hence the move to MinGW-64