FLTK 1.3.9: ./fltk-config --ldflags
-Lc:/fltk/lib -mwindows -lfltk -lole32 /usr/lib/w32api/libuuid.a -lcomctl32
FLTK 1.4.0 : ./fltk-config --ldflags
-L/cygdrive/c/fltk/lib -L/usr/lib -lfltk -lm -lX11 -lXext -lpthread -lXft -lXrender -lm -lfontconfig -ldl
When I compile a simple app on cygwin/windows11 in FLTK 1.3.9, the appopens a window11 window, but when the same app is compiled withFLTK 1.4, it opens in an X11 window.
Is there any way to get FLTK1.4 to use the windows11 windows, not X11?
You can see the difference with fltk-config:
FLTK 1.3.9: ./fltk-config --ldflags
-Lc:/fltk/lib -mwindows -lfltk -lole32 /usr/lib/w32api/libuuid.a -lcomctl32
FLTK 1.4.0 : ./fltk-config --ldflags
-L/cygdrive/c/fltk/lib -L/usr/lib -lfltk -lm -lX11 -lXext -lpthread -lXft -lXrender -lm -lfontconfig -ldl
(using FLTK 1.3.9 flags trying to compile with FLTK 1.4.0 results in lots of link errors).
thanks for any help
./configure --enable-localzlib --enable-localpng --prefix=c:/fltk
make
make install
cmake .. -DCMAKE_INSTALL_PREFIX=/cygdrive/c/fltk -DFLTK_BUILD_GL=OFF -DFLTK_BACKEND_X11=OFF -DFLTK_GRAPHICS_GDIPLUS=ON
(the FLTK_GRAPHICS_GDIPLUS seems to have no effect)
I've attached the logfile cmake created if that helps.
This line looks suspicious - as if the only choices are X11 or wayland, not also win32/GDI ?
-- Use Wayland : No (therefore, X11 is used)
thanks for the help.
Both FLTK 1.3.9 and 1.4 are the latest code downloaded yesterday from fltk.org and github respectively.
I'm compiling with cygwin (GCC version 11.4.0)
To compile FLTK 1.3.9, I use:./configure --enable-localzlib --enable-localpng --prefix=c:/fltk
make
make install
To compile FLTK 1.4.0, i used:
cmake .. -DCMAKE_INSTALL_PREFIX=/cygdrive/c/fltk -DFLTK_BUILD_GL=OFF -DFLTK_BACKEND_X11=OFF -DFLTK_GRAPHICS_GDIPLUS=ON
(the FLTK_GRAPHICS_GDIPLUS seems to have no effect)
I've attached the logfile cmake created if that helps.
This line looks suspicious - as if the only choices are X11 or wayland, not also win32/GDI ?
-- Use Wayland : No (therefore, X11 is used)
I've attached the logfile cmake created if that helps.
This line looks suspicious - as if the only choices are X11 or wayland, not also win32/GDI ?
-- Use Wayland : No (therefore, X11 is used)
On Fri, 16 Feb 2024, 17:40 Brian wrote:
I've attached the logfile cmake created if that helps.
This line looks suspicious - as if the only choices are X11 or wayland, not also win32/GDI ?
-- Use Wayland : No (therefore, X11 is used)
Hmm, that looks very much like cmake thinks your a POSIX system (which I suppose cygwin is, kinda...)
CMake/options.cmake:688: if(WIN32 AND NOT CYGWIN)
Is there some magic incantation we can give to cygwin to make it be "Windows native"? I'm sure there used to be but it's been so long that I don't remember.
Or... Maybe try just using the autoconf configure scheme instead of cmake?Autoconf isn't as "smart" as cmake so maybe it'll make fewer (wrong) assumptions?
My CYGWIN install is up to date (update yesterday).CMAKE is from cygwin:% which cmake/usr/bin/cmake% cmake --version
cmake version 3.25.3
Trying to build FLTK 1.4 with "configure"autoconf./configure --enable-localzlib --enable-localpng --prefix=c:/fltkmakeDies pretty early with:Compiling Fl_Browser.cxx...
In file included from Fl.cxx:22:
../FL/platform.H:68:8: error: ‘Window’ does not name a type; did you mean ‘Fl_Window’?
68 | inline Window fl_xid(const Fl_Window* w) { Fl_X *xTemp = Fl_X::flx(w); return xTemp ? (Window)xTemp->xid : 0; }
| ^~~~~~
| Fl_Window
../FL/platform.H:74:29: warning: ‘fl_find’ initialized and declared ‘extern’
74 | extern FL_EXPORT Fl_Window* fl_find(Window xid);
| ^~~~~~~
../FL/platform.H:74:37: error: ‘Window’ was not declared in this scope
74 | extern FL_EXPORT Fl_Window* fl_find(Window xid);
...
I've attached the config.log from './configure' if it helps.
The Tools
-----------
There are currently three main configurations supported by
FLTK with the GNU tools:
1. Cygwin: Built using the Cygwin toolset and using the Unix-like
POSIX compatibility layer provided by the Cygwin DLL.
License: GPL or non-free commercial license (ask Redhat).
2. Cygwin using the MinGW cross compiler suite: Built using
the Cygwin tools but not using the Cygwin DLL.
License: freely distributable on all Windows systems.
3. MinGW: Built using the MinGW utilities, compiler and tools. This
is, in many aspects, analogous to (2.). This is the recommended
one if you want to build native Windows programs only.
License: freely distributable on all Windows systems.
Point 2 above is what I was talking about.(unrelated but strange/annoying: CMAKE detects 'system zlib & png', while './configure' always picks 'built-in zlib & png')
I am having the same issue. With 1.3.x, the configure script worked beautifully when compiling to use the native Windows.
With fltk 1.4.x under Cygwin, I get the same window error as above.
Will this issue be fixed, or is the release of 1.5 (using cmake) imminent enough to not warrant it?
Yes, it's true, if you want to build "native" Windows programs under Cygwin you need to use a cross-compiler! The Cygwin environment is like a Linux host and the target is (native) Windows. This is also mentioned in README.Windows.txt ...
think the change lies in fltk 1.4.x. configure under 1.3.8 worked with my original cygwin version. 1.4.4 did not. I updated cygwin and the situation remained the same. I had not updated my windows at any time during this.
I tried a cmake build of 1.4.4. I set FLTK_BACKEND_X11 off. It compiled but still built X11. I think it tried to build wayland and failed so it fell back to X11. Is there another setting that I am missing?
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/fltkgeneral/5f90e8e8-4d9c-4087-b7a8-9e576812a878n%40googlegroups.com.
I got closer to compiling with cygwin with configure on 1.4.4. There is an issue in FL/platform.H. If I force it to include "win32.H" it solves the Window issue.
it seems that _WIN32 is not defined at that point.
BTW, I have a fork() in my code so I cannot follow the MinGW route unless I get around that.
HiI got closer to compiling with cygwin with configure on 1.4.4. There is an issue in FL/platform.H. If I force it to include "win32.H" it solves the Window issue.it seems that _WIN32 is not defined at that point.BTW, I have a fork() in my code so I cannot follow the MinGW route unless I get around that.
My build stopped when compiling files in /src/drivers/WinAPI. There are a bunch of Windows only functions (_wfopen, _waccess, etc) that are not available in Cygwin.I guess Cygwin with native windows was not considered.
When I first chose FLTK decades ago as my widget set for my project (meshalyzer, which is still running), one of the reasons was because it looked the same on all platform windowing systems.I would like to have a stable method for compiling under windows to use the native system, making it easy to build a stand-alone executable to be distributed without extra requirements. In particular, I use fork() and System V IPC in my code. If mingw is the way to go, I am fine with that.