I get the solution on IRC: class ALandscape should be class UNREAL_API ALandscape and UE must be recompiled.
There is errors when subclassing a class without UNREAL_API .
Report: succeeded in compiling landscape and landscapeEditor modules as two game play modules (not engine modules).
Overall steps : (4.22)
1.Create an empty project named myproject.
2.Copy over engine/source/runtime/landscape to myproject/source/MimicLand
3.Open in the VS, replace all occurences of “Landscape” to “MimicLand” case-sensitively. Replace LANDSCAPE_API and ENGINE_API properly.
fix build.cs and includes, and revert unwanted replacements of “Landscape” including occurences in “/Engine/EditorLandscapeResources…” from LandscapeEditor module and in structures or varibles that communicat with landscape shaders including “LandscapeProceduralPS.usf” and “LandscapeVertexFactory.ush”
4.Manage to compile the module. to compile LandscapeCollision.cpp as MimicLandCollision.cpp, a series of thirdparty includes should be added in the build.cs :
PublicIncludePaths.AddRange(
new string[] {
"D:\\unreal\\UE_4.22\\Engine\\Source\\Runtime\\Engine\\Public",
"other includings......"
});
5.Do the same for the LandscapeEditor module. fix dependcies in the build.cs.
6. success ! ^.^ Have to say unreal engine is wonderful and in a sense very playable itself …
Main drawbacks:
Editor tool icons are lost .
FLandscapeStaticLightingTextureMapping::ExportMapping and another method in the LandscapeLight.h defined in the StaticLightingExport.cpp of UnrealEd module, so in the end I think you still need to compile the entire engine …