Circularly Reference between GameModule and PluginModule failure in linking on Mac

My Gamemodule add plugin module to PublicDependencyModuleNames while plugin module add gamemodule to it’s.

It’s Ok on windows,But failure on Mac.Engine version is 4.17 and 4.18.

The Project is in GitHub - asqbtcupid/unreal.lua: lua solution for UnrealEngine4, reference “LuaPluginRuntime” while reference “CatchMe”

How to solve this problem?Please help thanks.

By restructuring your modules. Regardless that it may have compiled in some circumstances, you should never have a plugin module dependent on a game module. Also I’m not even sure UE4 allows circular dependencies outside of the engine at all; you should avoid them even if it does.

It depends on the situation, but generally you should be able to avoid circular dependencies by moving some code around, making more use of forward declarations and virtual interfaces, and/or perhaps by just extracting some code into an extra module.

thanks for help.If there is no choice,i will restruct plugin to solve the circularly referenced problem.