I'm thinking this code in fluid2's main() might be the issue:
--- snip
int main(int argc,char **argv) {
int i = 1;
if (!args(argc,argv,i,::arg) || i < argc-1) {
fprintf(stderr,"usage: %s <switches> name.fl\n"
" -c : write .cxx and .h and exit\n"
" -o <name> : .cxx output filename, or extension if <name> starts
with '.'\n"
" -h <name> : .h output filename, or extension if <name> starts
with '.'\n"
"%s\n", argv[0], help);
return 1;
}
const char *c = argv[i];
register_images(); <-- THIS MIGHT BE THE START OF THE PROBLEM
[..]
--- snip
This would appear to unconditionally assume fluid is being used as a GUI
app, but fluid can also be used as a pure command line tool (the -c
flag),
and in that mode should not invoke any GUI code.
Possibly the CLI flags should be checked for right at the top of main(),
and if they are non-gui mode flags, veer off to a function call that
handles
its operation and exits, to ensure no other main() GUI code is
accidentally
invoked.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk