Since Unreal Engine 4.20, I’m getting a ‘FLevelModel’ uses undefined class ‘WORLDBROSWER_API’ error in UE Engine’s LevelModel.h while trying to compile an HostProject (to compile a plugin).
That header file are in private directory it is not intended to be accessed outside the module that it is, it actully makes me wonder why you didn’t get linker errors from this
This macro pastes extern in case that module is compiled in to sperate dll. First of all you should make usre you add dependence for WorldBrowser module, UBT at that case should automatically solve all pathing and macro issues. If thats not work there other hack you can use, do #define WORLDBROWSER_API before include and #undef WORLDBROWSER_API after it, but again it is a hack to satisfy the compiler ;p so there might be even more serious issues, but if it worked for you in 4.19 then it will work the same as in that version.
The main issue is you trying to access header file from private, if you making plugin for market place you might have issues getting passed the submission checks.
As I come to a similiar problem but with another background, I have a question regarding these “_API - Definitions” . Why do I need this, or why do Unreal need this?