问题
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