C++ code not compiled, cause "editor only functions"

I have a code that provide by a programmer online, I try to compile a project with this code but not work, this programmer say me “this code have editor only functions” but nothing else to resolve this problem, anyone have a solution to found and change setting for those “editor only functions” ?? thanks!!
Emil

It sounds like you might need to wrap the code that is failing with an editor only macro, so that it is only included in the project if you are building for the editor, and not packaging a game. If the code is referencing other things that are only included in an editor build, the referenced functionality will not exist when you package your game, and will cause errors.

Here is an example:


#if WITH_EDITOR
    //Only include this line if building for editor
#endif