I've been trying to integrate FLTK with my Bazel project on a MacOS Ventura 13.0.1.
I'm using the following file to test whether I succeeded:
- test.cpp
```brew install fltk```and use a makefile: [...]
then everything works fine and my window pops up. However, if I now try to replicate it in bazel, for example by following this approach, then I can get everything to build successfully with the exception that `Fl::run()` just hangs without producing any output.
On 28 Jan 2023, at 23:53, Albrecht Schlosser <Albrech...@online.de> wrote:
--
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 on the web visit https://groups.google.com/d/msgid/fltkgeneral/f6e7333a-2248-7cec-54ad-3d3d96952b5f%40online.de.
On 29 Jan 2023, at 00:01, Mohammed <may64...@gmail.com> wrote:
It’s a peculiar thing I’ll admit. it was reported in the fltk-rs repo:
Continuing investigation …
The commit mentionned above introduces a call to Fl::add_fd() in the constructor of class ExternalCodeEditor.At least under macOS, this call implies to open the display. The blocking occurs while attempting to open the display.
One might consider that Fl::add_fd() should be avoided by fluid in command-line mode because the displayshould not be opened in that mode. The problem is that there's a global object created at static initialization time :
Fl_Code_Type Fl_Code_type; (see line 547 of fluid/Fl_Function_Type.cxx)
and type Fl_Code_Type contains a member variable of type ExternalCodeEditor.
Therefore, the constructor of class ExternalCodeEditor runs (and calls Fl::add_fd() since the recent commit)at static initialization time, also when fluid is in command-line mode.
--
You received this message because you are subscribed to a topic in the Google Groups "fltk.general" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fltkgeneral/miGhgA3y0xE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fltkgeneral...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/e9fd90c5-3fd0-f43a-4c08-a986bd318802%40online.de.
The problem was that a recent commit made fluid call Fl::add_fd() in a static initializer thread.
For some reason, Fl::add_fd() opens the display, specifically on macOS, not on other platforms.Matt removed this early call to add_fd().I find the problem of hanging build process to be fixed now.Hopefully that also solves the OP's problem.
--
You received this message because you are subscribed to a topic in the Google Groups "fltk.general" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fltkgeneral/miGhgA3y0xE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fltkgeneral...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/c2dcef94-3c90-1ce3-855b-964f97b01114%40online.de.
cp build/Xcode/bin/Debug/fluid.app/Contents/MacOS/fluid /tmp
cd /tmp
./fluid (hangs)
./fluid -h (works)
./fluid -u test.fl (works)
On 1/30/23 11:16, Manolo wrote:
Problems to launch unbundled macOS apps from /tmp should be fixed with commit 1045538
Oh wow, I didn't know unbundled macOS apps could work at all.
Back in ye olde days running an unbundled app (just the
executable, no .app directory)
did all kinds of weird window behavior things.
So that "works" now? Sounds great if so.
I always thought that was kinda weird when it didn't work just
because it couldn't
find those minimal plist files.