For fltk 1.4.x I've been using cmake to build FLTK on Windows
with msys2/mingw.
Here's some instructions I reposted in September 2020 of
something I posted
on coredev back in June.
In particular step 6 shows how to build with cmake, which
assumes
cmake was installed w/pacman; if not see step 5 for the
mingw/cmake install instructions.
Subject: Re: [fltk.general] Configure error when installing FLTK 1.4 on Windows/Mingw From: Greg Ercolano <er...@seriss.com> Date: Fri, 4 Sep 2020 10:51:40 -0700 [..]
1. Started with https://www.msys2.org/ Download and run the .exe, which guides you through a simple GUI wizard installation. You end up with a c:\msys64 directory once installed. 2. Open a mingw64 shell window from DOS, e.g. cd \msys64 mingw64.exe 3. Inside the new shell that opens, get the latest updates by running: pacman -Syu # -S=sync, -y=refresh pkg dbase, -u=upgrades out of date pkgs, 4. The above step may close the shell window you opened as part of the updating process. Docs say to open the window again, and this time run: pacman -Su 5. Now install man, vim, the 64bit compiler, make, man, and cmake for mingw: pacman -S man pacman -S vim pacman -S mingw-w64-x86_64-gcc pacman -S mingw-w64-x86_64-cmake pacman -S make Installing man is optional, but useful for 'man pacman'. Installing vim is optional, but it's useful to have a console editor of some kind. 6. With this installed, one should be able to run cmake to build fltk the usual way: cd /c/fltk-1.4.x-git mkdir build-mingw64 cd build-mingw64 /mingw64/bin/cmake -G "Unix Makefiles" .. make My result was a nice colorful progress and no errors. Please note the ".." at the end of the cmake command is literal, and not an elipsis. You can add other flags to the cmake command to affect the build of FLTK; see the README.CMake.txt docs for more about that.
The native application built by C::B in debug mode works well when launched from Windows.It cannot runs correctly when launched by C::B. Strange behaviour isn't it ?
[..] When on debug under C::B, it never returns from the fl::show() call.
Hmm, if you're in CodeBlocks debug mode and the code gets
"stuck" in fen->show() call,
check if you accidentally set a stray "breakpoint" or "stop"
for that line of code,
as I can't offhand think of a reason show() would not return,
as it doesn't actually show
the window, just sets some flags for it to be shown.. the
actual action of opening the
window should be handled deep in the application loop,
Fl::run().