{"id":4415,"date":"2022-06-29T20:40:58","date_gmt":"2022-06-29T18:40:58","guid":{"rendered":"https:\/\/store.algosyntax.com\/?post_type=asx-lms-tutorial-cpt&#038;p=4415"},"modified":"2026-03-09T10:41:24","modified_gmt":"2026-03-09T08:41:24","slug":"include-engine-h-monolithic-headers-should-not-be-used","status":"publish","type":"asx-lms-tutorial-cpt","link":"https:\/\/store.algosyntax.com\/tutorials\/unreal-engine\/include-engine-h-monolithic-headers-should-not-be-used\/","title":{"rendered":"#Include &#8220;Engine.h&#8221; Monolithic headers should not be used UE5 Warning"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"4415\" class=\"elementor elementor-4415\" data-elementor-post-type=\"asx-lms-tutorial-cpt\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-90558de elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"90558de\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9721b12\" data-id=\"9721b12\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0e28921 elementor-widget elementor-widget-text-editor\" data-id=\"0e28921\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>We will cover the alternative to using #include &#8220;Engine.h&#8221; in this tutorial. Whenever you use the global variable GEngine , you might encounter the error &#8220;Use of undeclared Identifier GEngine&#8221;.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e77c4b4 elementor-widget elementor-widget-text-editor\" data-id=\"e77c4b4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>You may then think the solution is to #include &#8220;Engine.h&#8221; , which works during development but will lead to plugins failing to package with the following warning: &#8221; Monolithic headers should not be used by this module. Please change it to explicitly include the headers it needs &#8220;.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fb5dcd5 elementor-widget elementor-widget-heading\" data-id=\"fb5dcd5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">The Alternative to \"Engine.h\"<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-56fc244 elementor-widget elementor-widget-text-editor\" data-id=\"56fc244\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>There are multiple headers that include the definition for GEngine and one of them is the &#8220;Runtime\\Engine\\Public\\Engine.h&#8221;\u00a0<\/p><p>and this is not what we want.\u00a0<\/p><p>The header to include in this case is:\u00a0 #include &#8220;Engine\/Engine.h&#8221;<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-aea027d elementor-widget elementor-widget-text-editor\" data-id=\"aea027d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Don&#8217;t get confused by the two, they are not the same although they are both Engine.h. Epic Games explained it better when they introduced their <a href=\"https:\/\/docs.unrealengine.com\/4.27\/en-US\/ProductionPipelines\/BuildTools\/UnrealBuildTool\/IWYU\/\" target=\"_blank\" rel=\"noopener\">Include What You Use model , or IWYU ,<\/a> which you should read about. In that article they mention the best way to use GEngine under this model.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"featured_media":0,"template":"","asx-lms-tutorial-categories":[58,45],"asx-lms-tutorial-tags":[46],"class_list":["post-4415","asx-lms-tutorial-cpt","type-asx-lms-tutorial-cpt","status-publish","hentry","asx-lms-tutorial-categories-unreal-c-api","asx-lms-tutorial-categories-unreal-engine","asx-lms-tutorial-tags-cpp","entry"],"acf":[],"_links":{"self":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt\/4415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt"}],"about":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/types\/asx-lms-tutorial-cpt"}],"version-history":[{"count":0,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt\/4415\/revisions"}],"wp:attachment":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/media?parent=4415"}],"wp:term":[{"taxonomy":"asx-lms-tutorial-categories","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-categories?post=4415"},{"taxonomy":"asx-lms-tutorial-tags","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-tags?post=4415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}