Getting armv7s and armv7 errors when archiving for release

I get an error while 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 would be appreciated.

+3
source share
4 answers

Finally, after many attempts, I got an answer, the problem was with the private path, since there must be a public path for the third-party library.

+2
source

My question was:
Somehow my "main.m" was deleted from the "compiler source" in the project settings / purpose.
Add it back, SOLVE it.

+5
source

check your build settings, as in this figure, if it does not update your code settings, like this one, this figure is extracted from my project, which works fine

0
source

I found a solution for your problem, you do not have the 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]));
    }
}
0
source

All Articles