1

Possible Duplicate:
Import existing c++ project into Xcode IDE

I have a bunch of c++ code that I would like to import in Xcode 4.2 and use its IDE features. My code is in two directory, include and src. I just want to import them to a project so that I can see list of my classes, their functions and create new ones. Also, I don't need to create makefile since I already have one. The main reason I want this is to use Xcode's suggestion features while writing my code.

My question is, which project should I select and how should I proceed?

Thanks a lot in advance Cheers Eda

Community
  • 1
  • 1
Eda
  • 53
  • 7
  • Here, use the top answer on this one :) http://stackoverflow.com/questions/5034286/import-existing-c-project-into-xcode-ide – Craig Aug 15 '12 at 08:41
  • http://stackoverflow.com/questions/5034286/import-existing-c-project-into-xcode-ide // I've been too slow :) – fachexot Aug 15 '12 at 08:41

2 Answers2

0

Create a project of type "External Build System", from the "Mac->Other" group. The template assistant asks you what build tool to use - it defaults to /usr/bin/make which is probably what you need.

  • Thanks Graham, I now created the project and added my files using Add Files to project but still I cannot see my classes, and I cannot see function suggestions.. – Eda Aug 15 '12 at 09:01
0

for make, open the New Project wizard, then Choose OS X > Other > External Build System

you then add sources to your project, and then you may need to specify some discovery paths in order for indexing and code completion to function properly.

justin
  • 104,054
  • 14
  • 179
  • 226
  • Thanks Justin, What are discovery paths for? and how can I specify them? – Eda Aug 15 '12 at 09:02
  • Xc4's indexer is a proper compiler component. just like you would for a compiler, you may need to specify directories for the compiler to locate your source files (`-I`). that, or configure a target (redundant). set the build setting at the project level `HEADER_SEARCH_PATHS`. description:http://stackoverflow.com/questions/3428216/adding-system-header-search-path-to-xcode – justin Aug 15 '12 at 09:20