I'm struggling with a Linker Error for an iOS project that was created with Unity 4.2.2. Since the last update of Unity, Xcode can't compile the project anymore, giving me the following error message:
Undefined symbols for architecture i386: "DebugStringToFile(char const*, int, char const*, int, int, int, int, int)", referenced from: prcore::Surface::ClearImage(prcore::color32 const&, prcore::Surface::ClearMode) in libiPhone-lib.a(blitter_integer.o) prcore::Surface::BlitImage(prcore::Surface const&, prcore::Surface::BlitMode) in libiPhone-lib.a(blitter_integer.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Screenshot:
Choosing the Device SDK and running it on the device works totally fine. But building for the iOS Simulator fails, no matter which settings I try to set in the project settings...
Unfortunately, this a bug in Unity 4.2.2, but will hopefully be fixed soon.
For the meanwhile, this simple workaround will do the job:
main.mm
in Xcode DebugStringToFile
:
void DebugStringToFile(char const*, int, char const*, int, int, int, int, int) { }
Finally, hit build and you're good to go!
Update: Fixed in Unity 4.3 :
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.