• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem with #include <unistd.h> - 'close' was not declared in this scope
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with #include <unistd.h> - 'close' was not declared in this scope


  • Subject: Re: Problem with #include <unistd.h> - 'close' was not declared in this scope
  • From: "Justin C. Walker" <email@hidden>
  • Date: Mon, 19 Nov 2007 08:59:04 -0800

Hi,

On Nov 19, 2007, at 08:03 , Tom O'Grady wrote:

I'm trying to use the 'close' function used for file descriptors etc, but even when I have the line '#include <unistd.h>', I get the message:

'close' was not declared in this scope.

The Xcode project includes some code involving sockets. The list of included headers is as follows:

#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types/h>
#include <sys/uio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa.inet.h>
[snip]
my Xcode project includes the file '$(SDKROOT)/usr/include/usr/ unistd.h'

I assume you typed the above in by hand (there several typos), but in any case, without a minimal example, it's not clear what's going wrong; and it's not easy to read your mind at this distance. I've not seen this error in this context before.


'#include "usr/include/unistd.h" '

You're right that this is the wrong solution.

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income
--------
When LuteFisk is outlawed,
Only outlaws will have LuteFisk
--------



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Problem with #include <unistd.h> - 'close' was not declared in this scope (From: "Tom O'Grady" <email@hidden>)

  • Prev by Date: Re: Difference between NIB and XIB
  • Next by Date: Unspecified File Encodings in 3.0
  • Previous by thread: Problem with #include <unistd.h> - 'close' was not declared in this scope
  • Next by thread: How to disable a window in carbon
  • Index(es):
    • Date
    • Thread