Xcode command line application - where is the executable code?

I am writing a small tool / command line application in Xcode 6. After a steep learning curve (I still climb) my code in main.m works for me without errors. My question is: does Xcode make some executable code that I can run from the command line inside the terminal? I tried "Build" and "Run and Build", but I do not see where the executable code is being created. I am very new to Xcode and need some help. I am using OS X 10.9.5 and Xcode 6.1.1 on Mac Mini.

If looking at my code is helpful, let me know and I can handle it.

Thanks for any help.

Kevin H.

+6
source share
2 answers

Hidden is very good. In Xcode 6, when you create the application, there is a Products folder in the project navigator (left panel). The name of your project will also be there. Right-click and select "show in finder". It will show you a hidden folder hidden deep in your OS X library where the executable is located.

+9
source

To copy the executable file to a more convenient place at each compilation, go to the project settings and select the build stage.

Enter an absolute location, for example: ~ / Documents / dev / temp. (It recognizes ~ as the current home directory of users)

Then click the "+" button in the "Copy Files" section and select "File" (select "Run" in the "Products" folder)

Uncheck "Copy only during installation." Then create and it should be in this place.

To run only the terminal application and go to this place. The executable file should be launched if it does not have dynamic libraries that are not in the lib path.

Hope this helps

+8
source

Source: https://habr.com/ru/post/981683/


All Articles