Hi!
I am trying to include my c++ plugin into my project, but when I “Generate Visual Studio Project Files” the “*.generate” files are created, but not included.
I have a Header named “Avatar.h”, the “Avatar.generated.h” exists in the “Intermediate” directory, but not found when I include it.
If you know why, I’ll be happy to have some help on this.
Thanks!
If it’s in your plugin, make sure your public/private include paths (in your PluginName.build.cs) are setup properly (you can look at something like Paper2D.build.cs to see how they have it setup).
It is indeed inside my plugin. My build.cs file is apparently setup properly :
PublicIncludePaths.AddRange(
new string[] {
"Public"
// ... add public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string[] {
"Private"
// ... add other private include paths required here ...
}
);
Knowing that I have two folder, Public and Private. The Avatar.h file is in the Public folder.
My plugin is enabled. I tried to create a plugin from scratch via the editor (plugins/new plugin/blank), generated the visual studio project files, and I have inclusion problems aswell.
If you try it, in the PluginNamePrivatePCH.h, I have an inclusion error for the “PluginName.h”
In the file PluginName.cpp you can see
#define LOCTEXT_NAMESPACE "FPluginNameModule"
void FPluginNameModule::StartupModule()
{
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
}
But, Visual studio triggers an error on FPluginNameModule::StartupModule() because “name followed by :: must be a class or a namespace name”
All these files being generated.
I think all these inclusion problems are related…
EDIT : I thought it could be a problem of dynamically generated files by UE (why not…?), so I build the game (via the UE plugin in Visual Studio) and the problem is still here
The include directories are completely driven by the .Build.cs files. You should be able to go into your project properties in VS and look at all the additional include directories/intermediate directories it lists and see where the discrepancy is.