lukmac
lukmac

Reputation: 4841

Xcode source code directory

Goodday!

Note1: Right-click the target and it is easy to add the search path for header files or lib, but there I havent found any option to add a new source code directory.

Note2: I havnt found an answer in the xcode build documentation for this issue.

P.S.: I hope that I can do it without copying all the files to the xcode explicitly.

Thank you!

Upvotes: 3

Views: 5024

Answers (3)

Pheu Verg
Pheu Verg

Reputation: 230

By the way (for those who are still searching and have problems with this issue), i have Xcode 4.5.2 and when i drag the items they are not linked! It seems that xcode's getting worse with each new version.
In case of xcode 4.5.2 if i copied class files into the separate folder i had to do right click to the group and choose 'add files to ""'

Upvotes: 1

Davidli
Davidli

Reputation: 11

You indicated that you wanted to use at least some of the source files in a project and intend on using some set of the same source files for other future projects.

Create a new static or dynamic library using the external collection of source files and then just link this project to it and future projects to it

The design of most build environments encourages the use of code in reusable libraries.

Davidli

Upvotes: 1

wadesworld
wadesworld

Reputation: 13763

Drag the directory containing the files into your Xcode project. The only way Xcode knows it needs to compile the files is if they are contained in the project and a part of the target.

Upvotes: 1

Related Questions