Unity3d

时间:2015-06-29 15:10:48

标签: ios xcode unity3d il2cpp

我正在尝试编译我的Unity3d C#脚本,以便在适用于iOS的arm64设备上运行。

Unity构建生成xCode项目没有问题,但xCode构建产生了一些语义问题错误:

CompileC /Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/AssemblyAttributes_g_Mono_Posix_Assembly.o Classes/Native/AssemblyAttributes_g_Mono_Posix_Assembly.cpp normal armv7 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode
    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 -O0 -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=8.1 -iquote /Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/myproject-generated-files.hmap -I/Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/myproject-own-target-headers.hmap -I/Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/myproject-all-target-headers.hmap -iquote /Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/myproject-project-headers.hmap -I/Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Products/Debug-iphoneos/include -I/Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode/Classes -I/Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode -I/Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode/Classes/Native -I/Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode/Libraries/bdwgc/include -I/Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode/Libraries/libil2cpp/include -I/Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/DerivedSources/armv7 -I/Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/DerivedSources -F/Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Products/Debug-iphoneos -F/Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode/../Assets/Plugins/myproject-iOS/.libs -mno-thumb -DINIT_SCRIPTING_BACKEND=1 -include /Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/PrecompiledHeaders/Prefix-ezhqqfjflyedusduqsaicoevmmnd/Prefix.pch -MMD -MT dependencies -MF /Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/AssemblyAttributes_g_Mono_Posix_Assembly.d --serialize-diagnostics /Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/AssemblyAttributes_g_Mono_Posix_Assembly.dia -c /Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode/Classes/Native/AssemblyAttributes_g_Mono_Posix_Assembly.cpp -o /Users/luis/Library/Developer/Xcode/DerivedData/Unity-iPhone-eqdiboubmtwcvkcuyaficuwofpvl/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/AssemblyAttributes_g_Mono_Posix_Assembly.o

/Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode/Classes/Native/AssemblyAttributes_g_Mono_Posix_Assembly.cpp:51:3: error: unknown type name 'AssemblyTitleAttribute_t500'; did you mean 'AssemblyTitleAttribute_t499'?
                AssemblyTitleAttribute_t500 * tmp;
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                AssemblyTitleAttribute_t499
In file included from /Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode/Classes/Native/AssemblyAttributes_g_Mono_Posix_Assembly.cpp:8:
/Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode/Classes/Native/mscorlib_System_Reflection_AssemblyTitleAttributeMethodDeclarations.h:8:8: note: 'AssemblyTitleAttribute_t499' declared here
struct AssemblyTitleAttribute_t499;
       ^
/Users/luis/Projects/Unity/myproject-unity/Unity/myproject_xcode/Classes/Native/AssemblyAttributes_g_Mono_Posix_Assembly.cpp:52:10: error: unknown type name 'AssemblyTitleAttribute_t500'; did you mean 'AssemblyTitleAttribute_t499'?
                tmp = (AssemblyTitleAttribute_t500 *)il2cpp_codegen_object_new (&AssemblyTitleAttribute_t500_il2cpp_TypeInfo);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                       AssemblyTitleAttribute_t499
.....
                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

当我开始使用 micro msclib 并且使用此处建议的link.xml文件(http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html)没有帮助时,就发生了这种情况。此外,我不知道在我的情况下我必须在link.xml文件中添加什么。

编辑:我发现这是因为我将兼容级别设置为 .net 2.0子集。我仍然不知道我正在使用哪些类导致此错误。

0 个答案:

没有答案