Xcode 6.1 c ++链接错误ld:入口点(_main)undefined。对于体系结构armv7 /(null):入口点(_main)未定义。对于架构arm64

时间:2014-11-30 15:50:42

标签: ios xcode linker

好吧,我看到有关于此类错误的谷歌答案 但他们都没有成功解决我的问题,该项目是从cmake创建的 我尝试编译iOS支持的3D框架,其他成功编译为iOS 当我尝试编译框架测试器时,我得到:

/Users/foo/Documents/3d/Urho3d_1.3.2/Urho3D/ios-Build/Tools/Urho3DPlayer/Urho3D.
build/Debug-iphoneos/Urho3DPlayer.build/Objects-normal/armv7/Urho3DPlayer normal armv7 cd
/Users/foo/Documents/3d/Urho3d_1.3.2/Urho3D/Source export
IPHONEOS_DEPLOYMENT_TARGET=8.1 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/foo/Documents/3d/Urho3d_1.3.2/Urho3D/ios-Bin
-F/Users/foo/Documents/3d/Urho3d_1.3.2/Urho3D/ios-Bin -filelist
/Users/foo/Documents/3d/Urho3d_1.3.2/Urho3D/ios-Build/Tools/Urho3DPlayer/Urho3D.
build/Debug-iphoneos/Urho3DPlayer.build/Objects-normal/armv7/Urho3DPlayer.LinkFileList
-dead_strip -framework AudioToolbox -framework CoreAudio -framework CoreGraphics
-framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit
-Wl,-search_paths_first -Wl,-headerpad_max_install_names
/Users/foo/Documents/3d/Urho3d_1.3.2/Urho3D/ios-Lib/libUrho3D.a -ldl -lpthread
-lpthread -lpthread -ldl -lpthread -lpthread -miphoneos-version-min=8.1 -Xlinker
-dependency_info -Xlinker
/Users/foo/Documents/3d/Urho3d_1.3.2/Urho3D/ios-Build/Tools/Urho3DPlayer/Urho3D.
build/Debug-iphoneos/Urho3DPlayer.build/Objects-normal/armv7/Urho3DPlayer_dependency_info.
dat -o
/Users/foo/Documents/3d/Urho3d_1.3.2/Urho3D/ios-Build/Tools/Urho3DPlayer/Urho3D.
build/Debug-iphoneos/Urho3DPlayer.build/Objects-normal/armv7/Urho3DPlayer

ld: entry point (_main) undefined. for architecture armv7 clang: error: linker command
failed with exit code 1 (use -v to see invocation)

当我检查使用lipo工具编译的静态库时:

lipo -info libUrho3D.a 
Architectures in the fat file: libUrho3D.a are: armv7 arm64 

lipo -info libSDL.a 
Architectures in the fat file: libSDL.a are: armv7 arm64 

这里有什么不妥?

0 个答案:

没有答案