ImageWriteBlueprintLibrary.h not found

The question says it all. I am trying to include ImageWriteBlueprintLibrary.h in Visual Studio 2022. However, intelisense says that source not found. And when built, the it gives the same error. I am using UE 5.4. I have tried refreshing the project from Unreal Engine. All the other header files work perfectly fine. Do I need to add any specific dll or include directory?

Hello and welcome to the forum.

You need to add ImageWriteQueue to your module dependencies, in your build file (<YourProjectName>.Build.cs)

1 Like

Thank you for helping me out. Is this the ImageWriteQueue under Runtime? I tried including that source file like this:

#include "Runtime/ImageWriteQueue/Public/ImageWriteBlueprintLibrary.h"

I am trying to use the function ExportToDisk, which cant be found under UImageWriteBlueprintLibrary, if I try it like this.

Edit: Oddly though when I look into the source file through an editor, I see the ExportToDisk listed as a static method under public. Not sure why Visual Studio is not picking that up.

No, you had the #include right initially, UE has its own build system, you need to edit your project’s ProjectName.Build.cs file and add ‘ImageWriteQueue’ to your dependencies, like so:

	// ...
	public ProjectName(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
	
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "ImageWriteQueue" });
		// ...
1 Like

The Module area shows in which module ImageWriteBlueprintLibrary is in (ImageWriteQueue).

The include part show how you should include it in your project (#include "ImageWriteBlueprintLibrary.h")

The header is where it is stored in the engine (you do not need this usually during a project)

You should add “ImageWriteQueue” to your public dependencies in your build.cs file

for example:

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "ImageWriteQueue" });

and then include the header where you want to use it

so for example in a cpp file near the top add

#include "ImageWriteBlueprintLibrary.h"

and then forward declare any of the needed classes that depend on the Module via forward declaration.

You could add the include to your header, but it’s bad practice and can cause cyclic dependency errors.

1 Like

@silnarm and @3dRaven

Thank you for the pointers. It’s been ages since I have fired up visual studio. After making the changes in the build.cs file, and restarting visual studio, the header files are showing up.

As for including the header files, I will try to follow the practices to add the header files in the cpp files.