iOS Build Environment Help Center

Delete

(Leave this as-is, it’s a trap!)

To delete this post you must be either the original author or a designated moderator.
The content of the post will be removed but the name and date will remain.

  • The post will be removed completely from the thread, rather than blanked
  • Only posts on the last page of the thread can be removed completely (so as to not break permalinks)

RE[6]: 'pch-cpp.hpp' file not found

Pierre-Marie Baty

Ok so that was a wrong guess. I’ll look at your project today.

:: @Pierre-Marie Baty added on 23 Mar ’23 · 12:43

*edit* Okay, the problem is nailed down. The compiler error happens not in the builder-driven step, but in Unity's IL2CPP compiler driver-driven step. An include path is missing in the Unity-constructed compiler invokation command line. The interesting bit here is that the missing include path appears in the Xcode project file in the HEADER_SEARCH_PATHS array of variables only, which is *not* passed to the Unity IL2CPP compiler driver. I am forced to deduce that the Unity IL2CPP compiler driver (which is from the builder's point of view a kind of "black box") either has platform-dependent, hardcoded include paths, or parses the Xcode project file on its own when it's running on macOS and doesn't do it when it's running on Windows. I'll add these paths explicitly in the build script and see if it works.

:: @Pierre-Marie Baty added on 23 Mar ’23 · 13:42

*edit 2* Alright, it is proven that the il2cpp compiler driver passes hardcoded include paths to the Clang compiler. These paths are relative to the Xcode project root. The fact that the compiler fails to find an include file at the right relative path can only mean that the il2cpp compiler driver fails to set the current working directory properly when starting clang on Windows.

Moderators: Pierre-Marie Baty