# How does 'DevelopmentEditor' affect the #IF\_WITH\_EDITOR code guard?

**URL:** <https://forums.unrealengine.com/t/how-does-developmenteditor-affect-the-if-with-editor-code-guard/358486>\
**Category:** Platform & Builds\
**Tags:** build, unreal-engine, linking, UE4, CPP, question\
**Created:** [May 25, 2016, 4:54am UTC](https://forums.unrealengine.com/t/how-does-developmenteditor-affect-the-if-with-editor-code-guard/358486 "2016-05-25T04:54:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nightmask3](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nightmask3/32/894376_2.png) [@Nightmask3](https://forums.unrealengine.com/u/Nightmask3)\
**Post date:** [May 25, 2016, 4:54am UTC](https://forums.unrealengine.com/t/how-does-developmenteditor-affect-the-if-with-editor-code-guard/358486/1 "2016-05-25T04:54:55Z")

</div>

Hey guys,

I’m attempting to extend the landscape classes (ALandscape for now) and I’ve run into something rather puzzling. When trying to build my project when in ‘DevelopmentEditor’ mode, it leads to a bunch of linker errors, and rather coincidentally only with functions that have their bodies wrapped with the #IF\_WITH\_EDITOR preprocesser directive.

Whenever I switch my build configuration to ‘Development’ these linker errors go away.

And thus I am left with a very confusing situation where the build configuration that logically SHOULD have #IF\_WITH\_EDITOR defined (cause it has Editor in the name), apparently not doing so.

I am ripe for an explanation. Would appreciate any clarification on this.

Thanks!

---

<div class="post-metadata">

**Author:** ![Nightmask3](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nightmask3/32/894376_2.png) [@Nightmask3](https://forums.unrealengine.com/u/Nightmask3)\
**Post date:** [July 22, 2016, 9:26pm UTC](https://forums.unrealengine.com/t/how-does-developmenteditor-affect-the-if-with-editor-code-guard/358486/2 "2016-07-22T21:26:27Z")

</div>

Answering my own question,

I found out that the code guard #IF\_WITH\_EDITOR" is used by the Epic staff to strip out all the implementation information that is associated with certain editor classes in order to speed up build times.

This is what was leading to my linker errors.

Still not certain why switching to ‘Development’ fixed these errors, but I’m guessing its because that macro is undefined in that particular build config.
