1. Home
  2. UE5 Compilation Errors
  3. UE5 C++ Compilation Error...
  4. Missing Module Dependency (Error C4668)

Missing Module Dependency (Error C4668)

The UE5 C4668 error ('SOME_MACRO' is not defined as a preprocessor macro) occurs when your project is missing a required module or macro definition. This is often caused by forgetting to add a module dependency in your Build.cs file. To fix this, open your Build.cs file and add the missing module to PublicDependencyModuleNames. For example, if you’re working with UMG, add "UMG" to the list. This ensures the Unreal Build Tool (UBT) includes the necessary dependencies, resolving the Unreal Engine 5 module error.

Was this article helpful to you? Yes No

How can we help?