Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: creating an executable file

Tags:

xcode

I am using Xcode to do C++ programming but the problem is when i build the program it doesnot creat a executable file like Turbo C++ creates a .exe file. What can i do to create such executable file on OS X environment using xcode.?

like image 519
Nabin Bhusal Avatar asked Sep 02 '26 12:09

Nabin Bhusal


2 Answers

Follows this: File->Project Settings->under Derived Data, Click the Advanced->Click Custom, then choose the option Relative to Workspace->Done. Then build your code and you will see Product file package in your project path. I am using Xcode 8.2.1, hope it may help.

like image 184
goodstar Avatar answered Sep 05 '26 02:09

goodstar


I'll try to summarise the following article and hope it'll help you get started:

How To: Compile and Run Basic C++ Programs in Xcode

  1. Start a new project: select File, New Project
  2. in the Application dropdown, pick your desired application type (i.e. "command line utility") and choose "C++ Tool"
  3. choose a location (and remember the path for later) and click Finish
  4. Start coding your application
  5. when you are done, click on the Build button
  6. now Finder and navigate to the project folder that you picked in step 3
  7. in it, you should find a file with the name of your project without any extension
  8. double click the file et voilà, your application should starts (in the example above, a terminal window should appear)

Let me know if it helped you solve your problem.

like image 29
SaschaM78 Avatar answered Sep 05 '26 02:09

SaschaM78



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!