I am using FLTK library (version 1.3.5) on iOS Mojave 10.14.6: I wrote this simple program
#include <stdlib.h> #include <FL/Fl.H> #include <FL/platform.H> #include <FL/Fl_Window.H> #include <FL/Fl_JPEG_Image.H> #include <FL/Fl_PNG_Image.H> #include <FL/Fl_Box.H> int main(int argc, char **argv) { Fl_Window *G_win = 0; G_win = new Fl_Window(650,650,"test"); Fl_Box* BG = new Fl_Box(0,0,650,650); Fl_PNG_Image *bg = new Fl_PNG_Image("scheme.png"); BG->image(bg); Fl_Box* text = new Fl_Box(250,20,150,20,"There should be an image down below. Is it so?"); G_win->end(); G_win->show(argc, argv); return Fl::run(); } and I compile it with the following Makefile (found here):
CC = $(shell fltk-config --cc) CXX = $(shell fltk-config --cxx) CFLAGS = $(shell fltk-config --cflags) -Wall -O3 -I/other/include/paths... CXXFLAGS = $(shell fltk-config --cxxflags) -Wall -O3 -I/other/include/paths... LINKFLTK = $(shell fltk-config --ldstaticflags) LINKFLTK_GL = $(shell fltk-config --use-gl --ldstaticflags) LINKFLTK_IMG = $(shell fltk-config --use-images --ldstaticflags) STRIP = strip POSTBUILD = fltk-config --post # Required on OSX, does nothing on other platforms, so safe to call all: myApp main.o: main.cpp $(CC) -c $< $(CCFLAGS) myApp: main.o $(CXX) -o $@ main.o $(LINKFLTK_IMG) $(LINKFLTK_GL) $(STRIP) $@ $(POSTBUILD) $@ # only required on OSX, but call it anyway for portability I get hence the binary myApp and the application myApp: when I type ./myApp in the shell eveything works fine (top image), while by double-clicking on the icon there is no image displayed (bottom image).
I got no errors during compilation, nor warnings. Are there any problems with the Makefile? Is it Mac iOS related?

