-1

I have a very old objective-c code( one C file) that I was trying to build with Xcode(version 13.1) and launch the unix executable that was generated. I'm able to build the code successfully and generated the executable. When Xcode launches the executable I could see that it was showing "Running executable" for 5 seconds and then finished running the executable. in the output window it showed "Program ended with exit code: 254".

Any idea what this exit code is for? I couldn't find anything in google.

I'm currently using mac 12.0.1, Xcode version 13.1

  • 1
    Xcode only runs on macOS. macOS doesn’t run Linux executables. Why are you expecting this to work? – Jim Jan 22 '22 at 14:12
  • Sorry My bad its a unix executable. – Abhishek varma Jan 23 '22 at 07:14
  • 1
    That doesn’t really mean anything. There are tonnes of Unix systems. What is the target platform? What are you _actually_ doing? How do you have the cross-compiler configured? – Jim Jan 23 '22 at 07:55
  • Its build for macos. This is years old code with a makefile, the executable generated is used by mac to communicate with specific kind of hardware. I'm trying to build the code with xcode so that I can debug I followed steps posted on some apple forum thread to convert the code with makefile to an xcode project. Its builds successfully but on running getting "program exited with exit code 254" in the output window. – Abhishek varma Jan 23 '22 at 17:44

1 Answers1

0

Someone gave the answer in apple forum. When it says "Program ended with exit code" it generally means program finished executing. In my case, I was getting exit code 254 it seams in my code exit(-2) is called.

ouflak
  • 2,458
  • 10
  • 44
  • 49