Hi, I’m converting a game to a template so I don’t have to keep creating files with each new engine. I have built the template from scratch with 4.8 preview 3. And the only problem that I am getting is a error in Visual Studio.
The are 3 errors, but the same error number.
Error C1083: Cannot open include file: ‘Networking.h’: No such file or directory
Error C1083: Cannot open include file: ‘Voice.h’: No such file or directory
Error C1083: Cannot open include file: ‘CanvasPanelSlot.h’: No such file or directory
I fixed the problem with my files. I needed to put
#include “Runtime/UMG/Public/Components/CanvasPanelSlot.h”
And do that for the file.h that I wanted to select within the Runtime Folder. But now I am getting other errors that are within those files when I compile , in either hot reload in UE4 editor and in VS. So I will make a Bug report
1 Like
It sounds like you’re missing some dependencies in your .Build.cs
file.
You’ll likely need to add the “Networking”, “Voice” and “UMG” modules to the PublicDependencyModuleNames
or PrivateDependencyModuleNames
array in your .Build.cs
file.
Including the header file as you have will prevent UBT being able to define some symbols that you may need (such as the API macros for each module, eg) VOICE_API
), and that will likely cause compile errors.
Hi, Jamie,
I’m trying to use Voice.h and OnlineSubsystemUtils.h . I have added “Voice” etc. in my .Build.cs file for my game but I am still running into the same error.
I have included the header files in the header file for my C++ actor as well. I would really appreciate your help. Thank you.
Note: I can not find the Voice.h file in the external dependencies folder of my game. I have downloaded a sample project that has Voice.h included and everything works smoothly in that project. I also saw some differences in the .ini files and I have copied those parts of the code where voice is enabled
After adding your modules to the PublicDependencyModuleNames you have to save the project, exit Visual Studio and then right click your .uproject file and hit “Generate Visual Studio project files”.
Then it should work.