Running a C++ project in Xcode Mac Os

CAF123
Gold Member
Messages
2,918
Reaction score
87
I am trying to run an Xcode project in c++ on a Mac Os. I started by creating new project, selecting command line tool options so that I may use c++ option and proceeded with completing the product name fields and the directory where to save the project on my Mac.

The default project that is created is the Hello World, however I wish to import some code from GitHub to use in the XCode IDE. I have the GitHub repository downloaded as a zip file on my computer and I tried to import this code in XCode via 'Files' -> 'Add Files to...' and selecting the code from my computer.

I then deleted the default main.cpp file from the XCode project ( the one that contains the Hello World) and tried to build and run the imported code. It says it builds successfully but when I try to run I get the error

'error: executable doesn't exist:'

and

'error: failed to launch' with 'LLDB provided no error string.' What does this mean?

There are so many options in XCode so it is not clear if I need to somehow link the imported files to the compiler or something. Maybe someone here has used XCode and knows the solution easily. Thanks in advance.
 
on Phys.org
While I don't know what happened here, I can say there are video tutorials on Youtube for doing various xcode tasks. Here's one on creating a project.



In general with IDE development, you can copy files into a project directly using the command line or via the File Explorer (aka Finder). and the IDE will notice and include them in the mix of code (if placed in the appropriate directories).
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 12 ·
Replies
12
Views
5K
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
3
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
Replies
7
Views
4K