Getting error of armv7s and armv7 while archiving for release

这一生的挚爱 提交于 2019-12-01 07:19:39

问题


I am getting error when archiving (for release)

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

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

Any help will be appreciated.


回答1:


My Issue was this:
Somehow my "main.m" got removed from "Compiler Source" in my Project Settings/Target.
Adding it back, SOLVED it.




回答2:


Finally after a lot of tries I got the answer, the problem was related to private path, as there should be a public path for 3rd party library.




回答3:


check in your build settings is like in this picture, if its not then update your code setting like this, this pic is take from my project which is working perfectly




回答4:


I have found solution for your problem, you don't have main.m method, create it like this,

#import <UIKit/UIKit.h>

#import "AppDelegate.h"

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}


来源:https://stackoverflow.com/questions/21725704/getting-error-of-armv7s-and-armv7-while-archiving-for-release

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!