升级到Unity 4.6.1后,链接器错误:未定义入口点(_main)。建筑v7

时间:2023-01-12 03:06:38

I am attempting to upgrade our Unity project from 4.5.4 to 4.6.1.

我正在尝试将Unity项目从4.5.4升级到4.6.1。

I can build the Xcode project out of Unity like normal. But, when I try to build that project from Xcode, I now get the following linker error:

我可以像往常一样在统一的基础上构建Xcode项目。但是,当我尝试从Xcode构建这个项目时,我现在得到了以下链接器错误:

ld: warning: directory not found for option '-F-filelist' ld: warning: ignoring file /Users/Eva/Library/Developer/Xcode/DerivedData/Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/supertestgame.LinkFileList, file was built for unsupported file format ( 0x2F 0x55 0x73 0x65 0x72 0x73 0x2F 0x45 0x76 0x61 0x2F 0x4C 0x69 0x62 0x72 0x61 ) which is not the architecture being linked (armv7): /Users/Eva/Library/Developer/Xcode/DerivedData/Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/supertestgame.LinkFileList ld: entry point (_main) undefined. for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

警告:忽略文件/用户/Eva/库/开发人员/Xcode/ Xcode/DerivedData/ unth -iphone . dxglecglezpcceadqwpribdgbg /Build/Intermediates/ un - iphone.o . Build/调试- iphone.o . Build/ un情景剧/ iphone.体- iphone.o . Build/超级游戏。LinkFileList,文件是为不支持的文件格式(0x2F 0x55 0x73 0x65 0x72 0x72 0x73 0x2F 0x2F 0x2F 0x45 0x76 0x60x2f 0x2F 0x4C 0x69 0x62 0x72 0x61 0x61)构建的,而不是被链接的体系结构(armv7): /Users/ Library/Developer/ DeveloperLinkFileList ld:未定义的入口点(_main)。对于架构armv7, clang: error: linker命令在退出代码1中失败(使用-v查看调用)

Here is the complete command that the linker is being passed:

下面是链接器正在通过的完整命令:

Ld /Users/Eva/Library/Developer/Xcode/DerivedData/Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg/Build/Products/supertestgame.app/supertestgame normal armv7 cd /Users/Eva/Documents/bin/sps export IPHONEOS_DEPLOYMENT_TARGET=6.0 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++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/Eva/Library/Developer/Xcode/DerivedData/Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg/Build/Products -L/Users/Eva/Documents/bin/sps/../../testgame_unity/Assets/Editor/Flurry/Ads -L/Users/Eva/Documents/bin/sps/../../testgame_unity/Assets/Editor/Flurry/Analytics -L/Users/Eva/Documents/bin/sps/../../testgame_unity/Assets/Editor/GameCenter -L/Users/Eva/Documents/bin/sps/../../testgame_unity/Assets/Editor/iCloud -L/Users/Eva/Documents/bin/sps/../../testgame_unity/Assets/Editor/Prime31Shared -L/Users/Eva/Documents/bin/sps/../../testgame_unity/Assets/Editor/SocialNetworking/Twitter -L/Users/Eva/Documents/bin/sps/../../testgame_unity/Assets/Editor/StoreKit -L/Users/Eva/Documents/bin/sps -L/Users/Eva/Documents/bin/sps/Libraries -F/Users/Eva/Library/Developer/Xcode/DerivedData/Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg/Build/Products -F/Users/Eva/Documents/bin/sps/../../testgame_unity/Assets/Editor/SocialNetworking/FacebookSDK -F/Users/Eva/Documents/bin/sps/../../testgame_unity/Assets/Plugins/Everyplay/iOS -F -filelist /Users/Eva/Library/Developer/Xcode/DerivedData/Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/supertestgame.LinkFileList -dead_strip -weak_framework CoreMotion -weak-lSystem -all_load -ObjC -stdlib=libstdc++ -fobjc-link-runtime -miphoneos-version-min=6.0 -framework CoreText -framework Everyplay -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework OpenAL -liconv.2 -liPhone-lib -framework AudioToolbox -framework CFNetwork -framework MediaPlayer -framework CoreLocation -framework SystemConfiguration -weak_framework iAd -framework CoreMedia -framework CoreVideo -weak_framework AVFoundation -framework CoreGraphics -weak_framework CoreMotion -weak_framework GameKit -lFlurryAds -lFlurry -lGameCenterPlugin -lP31MonoBridge -liCloudPlugin -lP31SharedTools -framework FacebookSDK -lP31Twitter -lStoreKit -framework AssetsLibrary -weak_framework MessageUI -weak_framework AdSupport -framework CoreData -framework Security -weak_framework Accounts -weak_framework Social -weak_framework Twitter -weak_framework StoreKit -lz.1.1.3 -lz -lsqlite3.0 -Xlinker -dependency_info -Xlinker /Users/Eva/Library/Developer/Xcode/DerivedData/Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/supertestgame_dependency_info.dat -o /Users/Eva/Library/Developer/Xcode/DerivedData/Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg/Build/Products/supertestgame.app/supertestgame

Ld /用户/ Eva /图书馆/开发/ Xcode / DerivedData / / supertestgame Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg /构建/产品。app/supertestgame普通armv7 cd /Users/Eva/Documents/bin/sps出口IPHONEOS_DEPLOYMENT_TARGET= "/ application /Xcode.app/ content /Developer/ platform/ iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode。应用程序/内容/开发/ usr / bin:/ usr / bin:/ bin:/ usr / sbin / sbin”/应用程序/ xcode /内容/开发/工具链/ XcodeDefault。xctoolchain/usr/bin/clang+ -arch armv7 -isysroot /Applications/Xcode.app/ content /Developer/ platform/ iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1sdk - l /用户/ Eva /图书馆/开发/ Xcode / DerivedData / Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg /构建/产品- l /用户/ Eva /文件/ bin / sps / . . / . ./ testgame_unity /资产/编辑/ Flurry /广告- l /用户/ Eva /文件/ bin / sps / . . / . ./ testgame_unity /资产/编辑/ Flurry Analytics - l /用户/ Eva /文件/ bin / sps / . . / . ./ testgame_unity /资产/编辑/ GameCenter - l /用户/ Eva /文件/ bin / sps / . . / . ./ testgame_unity /资产/编辑/ iCloud - l /用户/ Eva /文件/ bin / sps / . . / . ./ testgame_unity /资产/编辑/ Prime31Shared - l /用户/ Eva /文件/ bin / sps / . . / . ./ testgame_unity /资产/编辑/社交/ Twitter - l /用户/ Eva /文件/ bin / sps / . . / . ./testgame_unity/Assets/编辑器/StoreKit -L/用户/Eva/文档/bin/用户/用户/Eva/文档/bin/sps/库-F/用户/用户/用户/开发人员/Xcode/派生数据/ unix - iphone / dxglezpccetqwpribdgbg /构建/产品/用户/Eva ./ testgame_unity /资产/编辑/社交/ FacebookSDK - f /用户/ Eva /文件/ bin / sps / . . / . ./ testgame_unity /资产/插件/ Everyplay / iOS - f文件列表/用户/ Eva /图书馆/开发/ Xcode / DerivedData / Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg /构建/中间体/ Unity-iPhone.build Debug-iphoneos / Unity-iPhone.build Objects-normal / v7 / supertestgame。LinkFileList -dead_strip -weak_framework CoreMotion -weak-lSystem -all_load -ObjC -stdlib=libstdc+ -fobjc- linc -runtime -miphoneos-version-min=6.0 -framework CoreText -framework Everyplay -framework Foundation -framework Foundation -framework UIKit -framework OpenGLES -framework OpenGLES -framework OpenGLES -framework QuartzCore -framework QuartzCore -framework OpenAL -liconv。2 -liPhone-lib -framework AudioToolbox -framework网络-framework MediaPlayer -framework CoreLocation -framework system配置-weak_framework iAd -framework CoreMedia -framework CoreMedia -framework CoreVideo -weak_framework架构CoreGraphics -weak_framework GameKit -weak_framework GameKit - lflurryad - weaklflurryads -framework bookflurry -framework sdk框架-framework messlflurry -framework sdk框架-framework messl -framework sdk框架messl -framework messl -framework messl -framework messl框架messl -framework messl框架messl -framework messl框架messl -framework- Build a/ framework a/ framework a/ framework c / c / d/ c / d/ c / d/ c / d/ c / d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ c / d/ d/ d/ d/ d/ d/ d/ d/ c / d/ d/ d/ d/ d/ d/ c / d/ d/ d/ d/ d/ c / d/ d/ d/ d/ d/ d/ c / d/ d/ c / d/ c / c / c / d/ d/ d/ d/ d/ d/ d/ d/ d/ c / d/ d/ d/ d/ d/ d/ d/ d/ d/ d/ ddat - o /用户/ Eva /图书馆/开发/ Xcode / DerivedData / / supertestgame.app / supertestgame Unity-iPhone-dxcgletahzpcceadqwpribfbdgbg /构建/产品

My info under Architectures (in XCode) looks like this:

我在架构(XCode)下的信息如下:

Architectures: armv7 Base SDK: Latest iOS (iOS 8.1) Build Active Architecture Only: No Support Platforms: iphoneos Valid Architectures: arm64 armv7 armv7s

架构:armv7基础SDK:最新的iOS (iOS 8.1)只构建主动架构:没有支持平台:iphoneos有效架构:arm64 armv7 armv7s。

I guess the first thing I need to know is, what generates that *.LinkFileList? Is it Unity, or XCode?

我想我需要知道的第一件事是,是什么生成了*.LinkFileList?是Unity还是XCode?

Any idea what could be the cause of this issue?

你知道这个问题的原因吗?

Many Thanks!

很多谢谢!

1 个解决方案

#1


2  

Ok I managed to stumble upon the fix after a day of trying everything under the sun. Curious about the first warning (which I was under the assumption that it was unrelated to my issue):

好吧,我在阳光下试了一天之后偶然发现了这个问题。对第一个警告感到好奇(我假定它与我的问题无关):

ld: warning: directory not found for option '-F-filelist'

ld:警告:未找到“-F-filelist”选项的目录

I turned on linker verbosity (added a -v to the linker command list). I noticed this in there at the end:

我打开了链接器verbosity(在链接器命令列表中添加了-v)。最后我注意到

-F/Users/Eva/Documents/bin/testgame/../../../Desktop/everyplay-ios-sdk-master -F/Users/Eva/Documents/bin/testgame/../../testgame_unity/Assets/Editor/SocialNetworking/FacebookSDK -F-filelist

- f /用户/ Eva /文件/ bin / testgame / . . / . . / . ./桌面/ everyplay-ios-sdk-master - f /用户/ Eva /文件/ bin / testgame / . . / . ./ testgame_unity /资产/编辑/社交/ FacebookSDK -F-filelist

Turns out that corresponds to the list of 3 Framework Search Paths in the project, the 3rd one being $(inherited) in the project's Build Settings. And so just for fun I deleted that 3rd entry, and away my build went!

结果表明,这对应于项目中3个框架搜索路径的列表,第3个是项目构建设置中的$(继承)。为了好玩,我删除了第三个条目,然后我的构建就消失了!

I don't know what or if there will be any repercussions from doing that, but for now that is what I am going with.

我不知道这样做会不会有什么后果,但现在我想说的是。

#1


2  

Ok I managed to stumble upon the fix after a day of trying everything under the sun. Curious about the first warning (which I was under the assumption that it was unrelated to my issue):

好吧,我在阳光下试了一天之后偶然发现了这个问题。对第一个警告感到好奇(我假定它与我的问题无关):

ld: warning: directory not found for option '-F-filelist'

ld:警告:未找到“-F-filelist”选项的目录

I turned on linker verbosity (added a -v to the linker command list). I noticed this in there at the end:

我打开了链接器verbosity(在链接器命令列表中添加了-v)。最后我注意到

-F/Users/Eva/Documents/bin/testgame/../../../Desktop/everyplay-ios-sdk-master -F/Users/Eva/Documents/bin/testgame/../../testgame_unity/Assets/Editor/SocialNetworking/FacebookSDK -F-filelist

- f /用户/ Eva /文件/ bin / testgame / . . / . . / . ./桌面/ everyplay-ios-sdk-master - f /用户/ Eva /文件/ bin / testgame / . . / . ./ testgame_unity /资产/编辑/社交/ FacebookSDK -F-filelist

Turns out that corresponds to the list of 3 Framework Search Paths in the project, the 3rd one being $(inherited) in the project's Build Settings. And so just for fun I deleted that 3rd entry, and away my build went!

结果表明,这对应于项目中3个框架搜索路径的列表,第3个是项目构建设置中的$(继承)。为了好玩,我删除了第三个条目,然后我的构建就消失了!

I don't know what or if there will be any repercussions from doing that, but for now that is what I am going with.

我不知道这样做会不会有什么后果,但现在我想说的是。