- Home /
Can`t compile project in Xcode when scripting backend is set IL2CPP
Hi, I have set the Scripting Backend to IL2CPP and the Architecture to Universal in player setting of my Unity project. When I trying to compile it in Xcode, I got a lots of errors: "non-ASCII characters are not allowed outside of literals and identifiers" In order to check that the problem is not in some of attached plugins, I have builded an empty unity project and it have the same issue in Xcode.
It looks like this:
The full Xcode output:
CompileC /Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Bulk_Generics_3.o Classes/Native/Bulk_Generics_3.cpp normal armv7 c++ com.apple.compilers.llvm.clang.1_0.compiler cd /Users/imaslo/Desktop/test2 export LANG=en_US.US-ASCII export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11 -stdlib=libc++ -Wno-trigraphs -fno-rtti -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -miphoneos-version-min=7.1 -iquote /Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/ProductName-generated-files.hmap -I/Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/ProductName-own-target-headers.hmap -I/Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/ProductName-all-target-headers.hmap -iquote /Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/ProductName-project-headers.hmap -I/Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Products/Release-iphoneos/include -I/Users/imaslo/Desktop/test2/Classes -I/Users/imaslo/Desktop/test2 -I/Users/imaslo/Desktop/test2/Classes/Native -I/Users/imaslo/Desktop/test2/Libraries/bdwgc/include -I/Users/imaslo/Desktop/test2/Libraries/libil2cpp/include -I/Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/DerivedSources/armv7 -I/Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/DerivedSources -F/Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Products/Release-iphoneos -mno-thumb -DINIT_SCRIPTING_BACKEND=1 -include /Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/PrecompiledHeaders/Prefix-hcafvprjjfcvhcavfpokklrzopsg/Prefix.pch -MMD -MT dependencies -MF /Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Bulk_Generics_3.d --serialize-diagnostics /Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Bulk_Generics_3.dia -c /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp -o /Users/imaslo/Library/Developer/Xcode/DerivedData/Unity-iPhone-ganckkwjhudwzabttroogfabrnhs/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Bulk_Generics_3.o
/Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:82:13: error: non-ASCII characters are not allowed outside of literals and identifiers G_B4_0 = ( -1); ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:192:13: error: non-ASCII characters are not allowed outside of literals and identifiers G_B4_0 = ( -1); ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:301:32: error: non-ASCII characters are not allowed outside of literals and identifiers this-> idx_1 = ((int32_t) -2); ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:319:32: error: non-ASCII characters are not allowed outside of literals and identifiers this->__idx_1 = ((int32_t) -2); ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:330:50: error: non-ASCII characters are not allowed outside of literals and identifiers if ((!(((uint32_t)L_0) == ((uint32_t)((int32_t) -2))))) ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:345:37: error: non-ASCII characters are not allowed outside of literals and identifiers if ((((int32_t)L_3) == ((int32_t)( -1)))) ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:356:55: error: non-ASCII characters are not allowed outside of literals and identifiers G_B5_0 = ((((int32_t)((((int32_t)L_6) == ((int32_t)( -1)))? 1 : 0)) == ((int32_t)0))? 1 : 0); ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:382:50: error: non-ASCII characters are not allowed outside of literals and identifiers if ((!(((uint32_t)L_0) == ((uint32_t)((int32_t) -2))))) ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:396:41: error: non-ASCII characters are not allowed outside of literals and identifiers if ((!(((uint32_t)L_2) == ((uint32_t)( -1))))) ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:481:32: error: non-ASCII characters are not allowed outside of literals and identifiers this-> idx_1 = ((int32_t) -2); ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:499:32: error: non-ASCII characters are not allowed outside of literals and identifiers this->__idx_1 = ((int32_t) -2); ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:510:50: error: non-ASCII characters are not allowed outside of literals and identifiers if ((!(((uint32_t)L_0) == ((uint32_t)((int32_t) -2))))) ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:525:37: error: non-ASCII characters are not allowed outside of literals and identifiers if ((((int32_t)L_3) == ((int32_t)( -1)))) ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:536:55: error: non-ASCII characters are not allowed outside of literals and identifiers G_B5_0 = ((((int32_t)((((int32_t)L_6) == ((int32_t)( -1)))? 1 : 0)) == ((int32_t)0))? 1 : 0); ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:562:50: error: non-ASCII characters are not allowed outside of literals and identifiers if ((!(((uint32_t)L_0) == ((uint32_t)((int32_t) -2))))) ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:576:41: error: non-ASCII characters are not allowed outside of literals and identifiers if ((!(((uint32_t)L_2) == ((uint32_t)( -1))))) ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:660:32: error: non-ASCII characters are not allowed outside of literals and identifiers this-> idx_1 = ((int32_t) -2); ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:678:32: error: non-ASCII characters are not allowed outside of literals and identifiers this->__idx_1 = ((int32_t) -2); ^~~~~~~~ /Users/imaslo/Desktop/test2/Classes/Native/Bulk_Generics_3.cpp:689:50: error: non-ASCII characters are not allowed outside of literals and identifiers if ((!(((uint32_t)L_0) == ((uint32_t)((int32_t) -2))))) ^~~~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated.
BTW: If I trying to compile a project with 'scripting backend' = mono2x, there are no errors. My Unity version is 5.1.1 I have tried to rollback to 5.0.3 and 5.0.2 and it have no effect. Xcode version: 6.3.2 OS X: Yosemite (10.10.3)
Did anyone else encountered this problem? I can find any references in Google or Unity Community.
This is a bug in the il2cpp.exe utility. It is generating bad C++ code here. Can you please submit a bug report and include an example project which causes this issue? Let me know the bug number, and we will look at correcting it.
Answer by go_david · Jul 14, 2015 at 06:04 PM
Hi, Everything worked fine for me, then I changed my Date & Time Preferences (On a Mac) to something other than English, and my compilation failed with the same exception on many "-" signs. When I reverted back to English Date & Time everything returned to normal.
Hope that helps...
Your answer
Follow this Question
Related Questions
il2cpp code generation issue 1 Answer
iOS Javascript problem 0 Answers
iOS IL2CPP Build lacks some files. 1 Answer
IL2CPP Crash on OpenGL graphics device creation 2 Answers
What does MapFileParser do? 1 Answer