Juanma Barranquero writes: > Additionally to Eli's comments, the functions init_*_functions are > defined after being used to initialize the struct, so it fails: > > You'll have to move them around. Thanks. Fixed in the attached patch, which also addresses Eli's other comments. Please take a look again. > Anyway, what I was doing to move Vlibrary_cache out of w32 is affected > by your patch, so I'd be happy if you could also fix that. The main > issue is making sure that dynamic loading can be used before dumping, > but the dumped Vlibrary_cache and image_types do not get dumped with > entries that would not be relevant afterwards (that's could be an > issue on Windows). As far as I can tell, my patch should not change anything in this regard, except that when you move Vlibrary_cache out of w32, you can also get rid of the #ifdef NTGUI in define_image_type. Eli Zaretskii writes: > Since LIBRARIES could now be Qnil, but this function cannot tolerate > that, there should be an assertion to that effect, either here or in > every type->init function. Passing a nil LIBRARIES argument causes nil to be passed to w32_delayed_load, which AFAICT is safe; w32_delayed_load deals with nil just fine, as a no-op.