Jump to content

Including system header files in Xcode


Josh
 Share

Recommended Posts

I am new to xCode, and trying to include the following header files into a project:

<direct.h>

<io.h>

<sys\stat.h>

<sys\types.h>

 

Xcode cannot find any of these. I have not downloaded them or set any search directory pointing to their location. I do not know if these are found on my iMac anywhere.

 

In Visual Studio they get included without doing anything other than typing the name. What do I have to do to make Xcode know where to find these files, and do they need to be downloaded from somewhere?

 

Thanks.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

The last two might be due to the slashes being the wrong way round. (Windows used to use the backslash, but now accepts either. Unix systems only ever accept the forward slash for directories.)

 

As for the first two, what's "io.h"? is that not "stdio.h"?

 

"direct.h" I've never heard of before

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

Just thinking, do you know which compiler Xcode uses? I remember my first attempts at building C programs in linux with gcc. It didn't have a clue where to find <iostream> but the newer g++ knew straight away where to find it without me having to alter the include path. I later found out that you're not supposed to use iostream because the standard version is stdio.h. Perhaps some of your "missing" inclues are suffering a similar problem.

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...