ModuleManager: Unable to load module ‘E:/UE-4.11/…/Binaries/Win64/UE4Editor-…Plugin.dll’ because InitializeModule function was not found.
which is generated from ModuleManager.cpp, line 463. Where is this InitializeModule function [supposed to be] defined in my plugin? I do have a call to IMPLEMENT_MODULE (which worked in 4.10). Any suggestions on how to debug this?
dumpbin /exports UE4Editor-…Plugin.dll indicates that InitializeModule is indeed not exported from my plugin dll. There seems to be some discrepancy in the handling of the DLLEXPORT macro here as compared to 4.10.
Ok, so the only discrepancy is that in 4.11 all the source files are #included into a single Module.Plugin.cpp. This means header files from earlier source files are visible to later ones now, where they were not previously. In this case, turbojpeg.h was being included in another source file and it redefined DLLEXPORT which in turn broke the IMPLEMENT_MODULE macro. C++ is a joke ofc, so I don’t blame Epic for concocting their own module system on top of it, nevertheless it remains quite error prone and these details probably should be documented .