Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import existing C++ project into Xcode IDE

Tags:

c++

import

xcode

I am trying to open an existing C++ open-source library in Xcode to publish it with my own modification/additions. The library is Tesseract-OCR, which does not include a .xcodeproj file.

Since Xcode can function as an IDE, is it possible to open a bunch of files as a single project in Xcode? Is there an easy way to produce an Xcode project?

like image 728
Jes Chergui Avatar asked Feb 17 '11 20:02

Jes Chergui


People also ask

How do I add an existing file to Xcode Project?

Add Existing Files and Folders to a ProjectDrag the files from the Finder into the Project navigator. Click the Add button (+) in the Project navigator's filter bar, and choose Add Files to “projectName”. Choose File > Add Files to “projectName”.

How do I open an existing Project in Xcode?

Open a projectClick Open on the Welcome screen or File | Open from the main menu. Navigate to the desired . xcodeproj directory. Specify whether you want to open the project in a new window, or close the current project and reuse the existing window.


1 Answers

I realise you asked explicitly for Xcode, but in case you were actually trying to solve the problem of "I have existing C++ code which builds and runs fine from the command line, and I'd like to code and debug it in an IDE, what should I do?" my firm recommendation would be to avoid Xcode and go for Eclipse.

The reason is that as far as I can tell, Xcode has no way of ingesting the command line build environment and effectively requires you to recreate the make process inside Xcode from scratch. Fine for tiny projects, but anything with more than a few source files and it quickly becomes painful. Whereas in Eclipse everything is built around Makefiles. So in my case I got to the "step through code with working code completion" in Eclipse a lot quicker vs. never in Xcode. This of course could be because I'm an Xcode noob, but my 2c.

like image 173
Stephan Avatar answered Oct 01 '22 00:10

Stephan