We’re having difficulties maintaining a working iOS build, because there are C++ compile errors that only manifest within an iOS compile chain.
It seems like there are differences in either the headers that are included, or in the effects of their inclusion between a Windows build and an iOS build of our project. I want to understand what causes these differences, and, more importantly, exactly what the differences are. So that we can hopefully come up with a strategy to avoid regularly causing iOS build problems when working in Windows.
As a micro example of the problem, I made a new blank project, and added a single new C++ Actor class. In the header for this class I added a public “FCollisionShape MyCollisionShape;” variable to its class definition. No other changes.
This compiles fine for Windows builds but does not compile if I try to make an iOS build (I am remote building on a Mac):
UATHelper: Packaging (iOS): C:\Program Files\Epic Games\UE_4.18(18,2): error: unknown type name 'FCollisionShape'; did you mean 'ECollisionChannel'? UATHelper: Packaging (iOS): UATHelper: Packaging (iOS): FCollisionShape MyCollisionShape; UATHelper: Packaging (iOS): UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~
Now, this example is easy enough to resolve by explicitly including WorldCollision.h, but after our team has worked exclusively on Windows for a few days we can easily have a large number of related errors, because they didn’t show up in general development.
What I really want to understand is what the exact difference in include behavior is between the two platforms, and ideally, why this difference exists. If you are able to go further, and make suggestions on how we might avoid this flavor of platform specific compile errors in the future, we would be keen to hear them!