Xcode: Link error when building dynamic library for iOS simulator (x86_64)
After I upgraded CMake from version 3.18.4 to 3.19.2, there was a link problem when building the iOS dynamic library
The problem occurred when compiling the iOS Simulator x86_64 architecture. In the
Ld call, there was an additional
-F parameter, pointing to the specific system framework's path, but unfortunately the path for the simulator architecture should be
*/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/*, but it still points to iOS real device's SDK path, so it leads to the error of
Undefined symbols for architecture x86_64.
When I downgraded back to version 3.18.4, everything works fine.
P.S.: I have also encountered the Xcode database issue #21282 of new build system, and I have added the
-Tbuildsystem=1 parameter when using version 3.19.2, I am not sure if adding
-Tbuildsystem=1 parameter will cause this link with unexpected
-F parameter problem.