Mark J Olesen@DESKTOP-64I0KOO MINGW64 ~/opensource/fltk
$ make
[..]
=== making src ="">
make[1]: Entering directory '/home/Mark J
Olesen/opensource/fltk/src'
Compiling Fl.cxx...
In file included from Fl.cxx:22:
../FL/platform.H:51:14: fatal error: X11/Xlib.h: No such file or
directory
51 | # include <X11/Xlib.h>
| ^~~~~~~~~~~~
compilation terminated.
Having trouble replicating here, using a fresh install of
msys2 + fltk cloned from git
on Windows 8. (I see you used Win10, but I wouldn't think
it'd matter).
Sails right through the build of fltk-1.4.x freshly cloned
from github.
(I think you haven't mentioned which version of FLTK you're
using, so I'm
to assume the current master from git)
Perhaps the devil's in the details of how you installed
msys2?
Yes I think that's the case. The "problem" with MSYS2 is that there
are several "personalities" of the build tools, one for MSYS itself
(you MUST NOT use that one) and one for Windows (MinGW) 32-bit and
64-bit. You can use one of the latter, I'm using the 64-bit
versions.
This does obviously install the correct toolchain
(mingw-w64-x86_64). Unfortunately I don't have a log of my
installation available.
@Mark: you wrote:
> Are we missing some Windows flag to the compiler? It does not appear to
> be defining a Windows macro. So, platform.H thinks it is unix.
Exactly. Your gcc output does not contain the required _WIN32 macro
because this gcc "personality" is obviously for building MSYS
programs. For comparison, this is from my MSYS2 installation:
This shows that the required _WIN32 macro is defined here.
Mark, please try to follow the instructions Greg showed above and I
believe you should get the correct toolchain installed and your
Msys2/MinGW installation should be able to build FLTK for a standard
Windows environment.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.