Hi ,
Thank you for providing the sample project. I was able to use it to see the errors that you described. After spending quite a bit of time looking through code in Visual Studio to try to determine what was happening, it turns out the solution is actually quite a bit simpler.
Here is what was happening. As part of the build process, the Unreal Build Tool was creating several #define
preprocessor instructions for some USTRUCT
s in one of the files in the plugin. When it does this, UBT uses the project’s folder structure to create the identifier for the #define
instructions. Normally, this works fine. However, in this case the name of the root folder for the project started with a digit (4.9). Identifiers in C++ cannot start with a digit, they must start with a letter (upper or lowercase) or an underscore. This results in the compile errors that you are seeing. When I renamed the root project folder so that it started with a letter, I was able to compile the project successfully.
Please follow these steps and let me know if it clears up the issue for you:
- Rename the root project folder so that it starts with a letter or underscore (in this case, both
A4.9
and_4.9
should work fine). - Right-click on the .uproject file and select the “Generate Visual Studio project files” option.
- Open the project in Visual Studio and build it.