Running a C++ project in Xcode Mac Os

  • Thread starter CAF123
  • Start date
  • #1
CAF123
Gold Member
2,950
88
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.
 

Answers and Replies

  • #2
14,166
8,148
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).
 

Suggested for: Running a C++ project in Xcode Mac Os

  • Last Post
Replies
5
Views
563
Replies
6
Views
639
Replies
11
Views
1K
Replies
3
Views
742
Replies
27
Views
3K
Replies
21
Views
1K
  • Last Post
Replies
4
Views
2K
Replies
15
Views
835
Replies
6
Views
308
Top