Download

Plugin not seeing .inc ending on C++ header file in #include

I’m adding in Protobuf as a plugin. A few files in Protobuf end in .inc rather than the usual .h
The .h files are in my path fine as are the .dll and .lib files. A trivial example builds fine in my UE4 project.

A soon as I generate .h and .cpp files with protoc, it adds in a header from Protobuf the has a


#include <google/protobuf/port_def.inc> 

The compiler complains that is can’t find the file, yet it is right there with the other .h files.

Visual Studio intellisense does not complain and does not show it as an error.

How does one tell the Plugin generator and compiler to “include .inc files as though they are .h files”?

Solved it.
The problem was that my generated files are in my main game project, and the Plugin for Protobuf (that I am creating) was not included in the .Build.cs as a dependency.