Edit: Oops, title should be include, rather than import. Had python on the brain
Hey guys, I am developing a plugin on a 4.6 release fork using Visual Studio community edition, windows 7 x64. The central module for the plugin is using IInputDeviceModule, so clearly I am going to need access to the Input core types, such as FKeys, FKeyDetails, Ekeys.
However, when a private cpp file in my plugin includes InputCoreTypes.h, I get these syntax errors when trying to build the UE4 project when it gets to my plugin:
1>C:\projects\UnrealEngine\Engine\Source\Runtime\InputCore\Classes\InputCoreTypes.h(66): error C2143: syntax error : missing ';' before '<'
1>C:\projects\UnrealEngine\Engine\Source\Runtime\InputCore\Classes\InputCoreTypes.h(66): error C2913: explicit specialization; 'TStructOpsTypeTraits' is not a specialization of a class template
1>C:\projects\UnrealEngine\Engine\Source\Runtime\InputCore\Classes\InputCoreTypes.h(66): error C2059: syntax error : '<'
1>C:\projects\UnrealEngine\Engine\Source\Runtime\InputCore\Classes\InputCoreTypes.h(66): error C2059: syntax error : 'public'
1>C:\projects\UnrealEngine\Engine\Source\Runtime\InputCore\Classes\InputCoreTypes.h(67): error C2143: syntax error : missing ';' before '{'
1>C:\projects\UnrealEngine\Engine\Source\Runtime\InputCore\Classes\InputCoreTypes.h(67): error C2447: '{' : missing function header (old-style formal list?)
This is what InputCoreTypes looks like around there:
template<>
struct TStructOpsTypeTraits<FKey> : public TStructOpsTypeTraitsBase
{
enum
{
WithSerializeFromMismatchedTag = true,
WithExportTextItem = true,
WithImportTextItem = true,
WithPostSerialize = true,
};
};
So I think it has something to do with the fact that this struct is not exposed in the InputCoreAPI? Just guessing.
This is what my Build.cs looks like for the plugin:
namespace UnrealBuildTool.Rules
{
public class MIDIControl : ModuleRules
{
public MIDIControl(TargetInfo Target)
{
PublicIncludePaths.AddRange(
new string] {
// ... add public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string] {
"Runtime/MIDIControl/Private",
// ... add other private include paths required here ...
}
);
PublicDependencyModuleNames.AddRange(
new string]
{
"Core",
// ... add other public dependencies that you statically link with here ...
}
);
PrivateDependencyModuleNames.AddRange(
new string]
{
"InputCore",
"InputDevice",
// ... add private dependencies that you statically link with here ...
}
);
DynamicallyLoadedModuleNames.AddRange(
new string]
{
// ... add any modules that your module loads dynamically here ...
}
);
}
}
}
The code that is including InputCoreTypes.h is in the private source for my plugin. Any ideas on what I am doing wrong? Thanks