Post

Replies

Boosts

Views

Activity

MacOS bundle's binary can't run
I made a project with MacOS/Bundle/Objective-C. I added main.m as like: #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { printf("Test\n"); } Built it and the generated bundle. I open the bundle with Finder and located the binary in the MacOS directory within the bundle. The file command returned as like: <path...>TestProject: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit bundle x86_64] [arm64:Mach-O 64-bit bundle arm64] <path...>TestProject (for architecture x86_64):Mach-O 64-bit bundle x86_64 <path...>TestProject (for architecture arm64): Mach-O 64-bit bundle arm64 It apparently generated the Universal binary. Of course, no error were reported on building. I tried to execute the binary with drag&drop the file into Terminal, but shell reported as like: zsh: exec format error: <path..>TestProject These are reproducing my trouble. My target project is so old but it can generate executable x86_64 only binary. I want to be universal binary. My Xcode is 15.4 on Sonoma.
1
0
424
Jul ’24