Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Adding Header File for C++ Program in Xcode
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mystic_fm" data-source="post: 756974" data-attributes="member: 28538"><p>Sorry, I won't visit the link you provided (particularly since MediaFire shows many reports of popups and browser exploits on SiteAdvisor).</p><p></p><p>In all of the smaller Xcode projects I've encountered, header files are usually dumped into both the same physical folder and the same "project group" as their corresponding implementation files (i.e., either "Classes" or "Other Sources", whichever is appropriate). However, there's nothing constraining you from categorizing things in the project differently if you wish. At a minimum, you could easily add a "Header Files" project group to "virtually" separate the header files if that would make things feel more familiar to you.</p><p></p><p>(Ignore the next two paragraphs if they are too confusing.)</p><p></p><p>You could go a step further and also create a separate physical location for those files. In this case, just remember that the compiler for each source file needs to be able to find the referenced header files, so if you have them physically separated, you must either specify a relative path to those header files in your #include (or #import) directives, or else add each of the header file folders to the "user header search path" in the project's build settings.</p><p></p><p>By the way, you could also organize your header files differently in Visual Studio if you wanted to ... the default project organization that VS gives you is not cast in stone either.</p></blockquote><p></p>
[QUOTE="mystic_fm, post: 756974, member: 28538"] Sorry, I won't visit the link you provided (particularly since MediaFire shows many reports of popups and browser exploits on SiteAdvisor). In all of the smaller Xcode projects I've encountered, header files are usually dumped into both the same physical folder and the same "project group" as their corresponding implementation files (i.e., either "Classes" or "Other Sources", whichever is appropriate). However, there's nothing constraining you from categorizing things in the project differently if you wish. At a minimum, you could easily add a "Header Files" project group to "virtually" separate the header files if that would make things feel more familiar to you. (Ignore the next two paragraphs if they are too confusing.) You could go a step further and also create a separate physical location for those files. In this case, just remember that the compiler for each source file needs to be able to find the referenced header files, so if you have them physically separated, you must either specify a relative path to those header files in your #include (or #import) directives, or else add each of the header file folders to the "user header search path" in the project's build settings. By the way, you could also organize your header files differently in Visual Studio if you wanted to ... the default project organization that VS gives you is not cast in stone either. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Adding Header File for C++ Program in Xcode
Top